docopt/docopt.php — pull request #12 by marcioAlmada (2014-09-22 02:08:52+00:00)
Title: Fix options first behavior

When `Handler::$optionsFirst` is set to `true` I get the following error stack:

```
array_merge(): Argument #2 is not an array in src/docopt.php on line 85
PHP Warning: array_merge(): Argument #2 is not an array in src/docopt.php on line 85
Warning: Invalid argument supplied for foreach() in src/docopt.php on line 997
PHP Warning: Invalid argument supplied for foreach() in src/docopt.php on line 433
```

It seems that `array_map` was receiving a `TokenStream` object instead of array :)