fabpot/PHP-CS-Fixer — pull request #345 by localheinz (2014-04-23 19:55:35+00:00)
Title: Enhancement: Make path argument optional

Some people - namely the [ZF2](http://github.com/zendframework/zf2) community - have been experiencing failing builds on Travis as a result of https://github.com/fabpot/PHP-CS-Fixer/pull/342 and the following setup:

### Steps to reproduce

* requiring `fabpot/php-cs-fixer: "dev-master"`
* running (note the `.` as `path` argument)

```
$ vendor/bin/php-cs-fixer fix -v --dry-run .
```

while having a `.php_cs` that specifies directories

```php
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__ . '/library')
->in(__DIR__ . '/tests')
->in(__DIR__ . '/bin')
;
```

and while having files within `__DIR__` (or other directories therein not listed above) that will cause the script to exit with something else than `0` as status.

Basically, the problem is that the `path` argument is *required*, and in a setup as described above and with the changes introduced in #342, the `.` path gets added to the `Finder` while before #342, it wasn't.

### Solution

Either revert #342 or make the `path` argument optional.

This PR makes the `path` argument optional.