mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
enforce code style with php-cs in travis
This commit is contained in:
parent
350e19c285
commit
83cea01c56
4 changed files with 5 additions and 3 deletions
|
|
@ -50,6 +50,7 @@ install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpunit --coverage-clover clover.xml -c tests/phpunit.xml
|
- 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:
|
after_script:
|
||||||
- wget https://scrutinizer-ci.com/ocular.phar
|
- wget https://scrutinizer-ci.com/ocular.phar
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
],
|
],
|
||||||
"require" : {
|
"require" : {
|
||||||
"php": ">=5.6",
|
"php": ">=5.6",
|
||||||
"icewind/streams": ">=0.2.0"
|
"icewind/streams": ">=0.2.0",
|
||||||
|
"friendsofphp/php-cs-fixer": "^2.13"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^5.7"
|
"phpunit/phpunit": "^5.7"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class NativeFileInfo implements IFileInfo {
|
||||||
|
|
||||||
if (is_array($stat)) {
|
if (is_array($stat)) {
|
||||||
$this->statCache = $stat;
|
$this->statCache = $stat;
|
||||||
} else if (is_callable($stat)) {
|
} elseif (is_callable($stat)) {
|
||||||
$this->statCallback = $stat;
|
$this->statCallback = $stat;
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException('$stat needs to be an array or callback');
|
throw new \InvalidArgumentException('$stat needs to be an array or callback');
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class NativeShare extends AbstractShare {
|
||||||
$name = $file['name'];
|
$name = $file['name'];
|
||||||
if ($name !== '.' and $name !== '..') {
|
if ($name !== '.' and $name !== '..') {
|
||||||
$fullPath = $path . '/' . $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);
|
return $this->getStat($fullPath);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue