diff --git a/.travis.yml b/.travis.yml index 668128a..98ac39a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,7 @@ install: script: - vendor/bin/phpunit --coverage-clover clover.xml -c tests/phpunit.xml + - vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --dry-run --diff --diff-format udiff after_script: - wget https://scrutinizer-ci.com/ocular.phar diff --git a/composer.json b/composer.json index 708c59b..5cb22ee 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,8 @@ ], "require" : { "php": ">=5.6", - "icewind/streams": ">=0.2.0" + "icewind/streams": ">=0.2.0", + "friendsofphp/php-cs-fixer": "^2.13" }, "require-dev": { "phpunit/phpunit": "^5.7" diff --git a/src/Native/NativeFileInfo.php b/src/Native/NativeFileInfo.php index 350b8af..9043189 100644 --- a/src/Native/NativeFileInfo.php +++ b/src/Native/NativeFileInfo.php @@ -53,7 +53,7 @@ class NativeFileInfo implements IFileInfo { if (is_array($stat)) { $this->statCache = $stat; - } else if (is_callable($stat)) { + } elseif (is_callable($stat)) { $this->statCallback = $stat; } else { throw new \InvalidArgumentException('$stat needs to be an array or callback'); diff --git a/src/Native/NativeShare.php b/src/Native/NativeShare.php index fe5ebf2..a2f2d83 100644 --- a/src/Native/NativeShare.php +++ b/src/Native/NativeShare.php @@ -94,7 +94,7 @@ class NativeShare extends AbstractShare { $name = $file['name']; if ($name !== '.' and $name !== '..') { $fullPath = $path . '/' . $name; - $files [] = new NativeFileInfo($this, $fullPath, $name, function() use ($fullPath) { + $files [] = new NativeFileInfo($this, $fullPath, $name, function () use ($fullPath) { return $this->getStat($fullPath); }); }