Skip to content

Commit ab83e5b

Browse files
committed
Updated coding standard
1 parent e6e0d5e commit ab83e5b

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ install:
2525
- travis_retry composer install --no-interaction --prefer-dist
2626

2727
script:
28-
- if [ "$COVERAGE" != "1" ]; then composer check; fi
28+
- >
29+
if [ "$COVERAGE" != "1" ]; then
30+
phpenv config-rm xdebug.ini
31+
&& composer check; fi
2932
- if [ "$COVERAGE" == "1" ]; then ./vendor/bin/phpunit --coverage-clover=./coverage.xml; fi
3033

3134
after_success:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"require-dev": {
1919
"jakub-onderka/php-parallel-lint": "^0.9.2",
2020
"phpstan/phpstan": "^0.6.4",
21-
"lookyman/coding-standard": "^0.0.4",
22-
"phpunit/phpunit": "^6.0"
21+
"phpunit/phpunit": "^6.0",
22+
"lookyman/coding-standard": "^0.0.5"
2323
},
2424
"autoload": {
2525
"psr-4": {
@@ -33,7 +33,7 @@
3333
},
3434
"scripts": {
3535
"lint": "parallel-lint ./src ./tests",
36-
"cs": "phpcs --colors --extensions=php --encoding=utf-8 --standard=./ruleset.xml -sp ./src ./tests",
36+
"cs": "phpcs --colors --extensions=php --encoding=utf-8 -sp ./src ./tests",
3737
"tests": "phpunit --coverage-text",
3838
"stan": "phpstan analyse -l 5 -c ./phpstan.neon ./src ./tests",
3939
"check": [
File renamed without changes.

src/Rules/ContainerInterfacePrivateServiceRule.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
namespace Lookyman\PHPStan\Symfony\Rules;
66

77
use Lookyman\PHPStan\Symfony\ServiceMap;
8+
use PHPStan\Analyser\Scope;
9+
use PHPStan\Rules\Rule;
810
use PhpParser\Node;
911
use PhpParser\Node\Arg;
1012
use PhpParser\Node\Expr\MethodCall;
1113
use PhpParser\Node\Scalar\String_;
12-
use PHPStan\Analyser\Scope;
13-
use PHPStan\Rules\Rule;
1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515

1616
final class ContainerInterfacePrivateServiceRule implements Rule
@@ -49,4 +49,5 @@ public function processNode(Node $node, Scope $scope): array
4949
? [\sprintf('Service "%s" is private.', $node->args[0]->value->value)]
5050
: [];
5151
}
52+
5253
}

src/Rules/ContainerInterfaceUnknownServiceRule.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
namespace Lookyman\PHPStan\Symfony\Rules;
66

77
use Lookyman\PHPStan\Symfony\ServiceMap;
8+
use PHPStan\Analyser\Scope;
9+
use PHPStan\Rules\Rule;
810
use PhpParser\Node;
911
use PhpParser\Node\Arg;
1012
use PhpParser\Node\Expr\MethodCall;
1113
use PhpParser\Node\Scalar\String_;
12-
use PHPStan\Analyser\Scope;
13-
use PHPStan\Rules\Rule;
1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515

1616
final class ContainerInterfaceUnknownServiceRule implements Rule
@@ -48,4 +48,5 @@ public function processNode(Node $node, Scope $scope): array
4848
? [\sprintf('Service "%s" is not registered in the container.', $node->args[0]->value->value)]
4949
: [];
5050
}
51+
5152
}

src/ServiceMap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ public function getServices(): array
4747
{
4848
return $this->services;
4949
}
50+
5051
}

src/Type/ContainerInterfaceDynamicReturnTypeExtension.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
namespace Lookyman\PHPStan\Symfony\Type;
66

77
use Lookyman\PHPStan\Symfony\ServiceMap;
8-
use PhpParser\Node\Arg;
9-
use PhpParser\Node\Expr\MethodCall;
10-
use PhpParser\Node\Scalar\String_;
118
use PHPStan\Analyser\Scope;
129
use PHPStan\Reflection\MethodReflection;
1310
use PHPStan\Type\DynamicMethodReturnTypeExtension;
1411
use PHPStan\Type\ObjectType;
1512
use PHPStan\Type\Type;
13+
use PhpParser\Node\Arg;
14+
use PhpParser\Node\Expr\MethodCall;
15+
use PhpParser\Node\Scalar\String_;
1616
use Symfony\Component\DependencyInjection\ContainerInterface;
1717

1818
final class ContainerInterfaceDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
@@ -52,4 +52,5 @@ public function getTypeFromMethodCall(
5252
? new ObjectType($services[$methodCall->args[0]->value->value]['class'], \false)
5353
: $methodReflection->getReturnType();
5454
}
55+
5556
}

0 commit comments

Comments
 (0)