fabpot/PHP-CS-Fixer — pull request #347 by webarto (2014-04-24 18:04:08+00:00)
Title: Fix $config(Dir|File)

Current way of looking for `.php_cs` is a bit broken, here are few examples:

```
# OK
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run vendor
"/opt/PHP-CS-Fixer/vendor/.php_cs"
# FAIL
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run vendor/autoload.php
"/opt/PHP-CS-Fixer/vendor/autoload.php/.php_cs"
# FAIL
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run - < vendor/autoload.php
"/opt/PHP-CS-Fixer/-/.php_cs"
```

With fix (I can't say it's elegant):

```
# OK
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run vendor
"/opt/PHP-CS-Fixer/vendor/.php_cs"
# OK
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run vendor/autoload.php
"/opt/PHP-CS-Fixer/vendor/.php_cs"
# OK, assume current directory for STDIN
/opt/PHP-CS-Fixer>php php-cs-fixer fix --dry-run - < vendor/autoload.php
"/opt/PHP-CS-Fixer/.php_cs"
```