File tree 7 files changed +18
-19
lines changed
tests/Type/WebMozartAssert
7 files changed +18
-19
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,3 @@ before_script:
12
12
- if [ "$dependencies" = "highest" ]; then composer update --no-interaction; fi;
13
13
script :
14
14
- vendor/bin/phing
15
- - >
16
- wget https://github.com/maglnet/ComposerRequireChecker/releases/download/0.2.1/composer-require-checker.phar
17
- && php composer-require-checker.phar check composer.json
Original file line number Diff line number Diff line change 86
86
>
87
87
<arg value =" analyse" />
88
88
<arg value =" -l" />
89
- <arg value =" 7 " />
89
+ <arg value =" 8 " />
90
90
<arg value =" -c" />
91
91
<arg path =" phpstan.neon" />
92
92
<arg path =" src" />
Original file line number Diff line number Diff line change 7
7
"prefer-stable" : true ,
8
8
"extra" : {
9
9
"branch-alias" : {
10
- "dev-master" : " 0.11 -dev"
10
+ "dev-master" : " 0.12 -dev"
11
11
},
12
12
"phpstan" : {
13
13
"includes" : [
17
17
},
18
18
"require" : {
19
19
"php" : " ~7.1" ,
20
- "phpstan/phpstan" : " ^0.11.6 " ,
21
- "nikic/php-parser" : " ^4.0 "
20
+ "phpstan/phpstan" : " ^0.12 " ,
21
+ "nikic/php-parser" : " ^4.3 "
22
22
},
23
23
"require-dev" : {
24
24
"consistence/coding-standard" : " ^3.7" ,
25
25
"dealerdirect/phpcodesniffer-composer-installer" : " ^0.4.4" ,
26
26
"jakub-onderka/php-parallel-lint" : " ^1.0" ,
27
27
"phing/phing" : " ^2.16.0" ,
28
- "phpstan/phpstan-strict-rules" : " ^0.11 " ,
29
- "phpstan/phpstan-phpunit" : " ^0.11 " ,
28
+ "phpstan/phpstan-strict-rules" : " ^0.12 " ,
29
+ "phpstan/phpstan-phpunit" : " ^0.12 " ,
30
30
"phpunit/phpunit" : " ^7.1.3" ,
31
31
"slevomat/coding-standard" : " ^4.5.2" ,
32
32
"webmozart/assert" : " ^1.3.0"
Original file line number Diff line number Diff line change 23
23
@dataProvider,
24
24
@requires
25
25
" />
26
+ <property name =" enableObjectTypeHint" value =" false" />
26
27
</properties >
28
+ <exclude name =" SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification" />
29
+ <exclude name =" SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification" />
27
30
</rule >
28
31
<rule ref =" SlevomatCodingStandard.ControlStructures.AssignmentInCondition" />
29
32
<rule ref =" SlevomatCodingStandard.ControlStructures.DisallowEqualOperators" />
Original file line number Diff line number Diff line change @@ -7,6 +7,4 @@ includes:
7
7
8
8
parameters :
9
9
excludes_analyse :
10
- - */tests/*/data/*
11
- ignoreErrors :
12
- - '~^Parameter \#1 \$node \ (.*\ ) of method .*Rule::processNode\ (\ ) should be contravariant with parameter \$node \ (PhpParser\\Node\ ) of method PHPStan\\Rules\\Rule::processNode\ (\ )$~'
10
+ - tests/*/data/*
Original file line number Diff line number Diff line change 4
4
5
5
use PHPStan \Rules \Rule ;
6
6
7
+ /**
8
+ * @extends \PHPStan\Testing\RuleTestCase<VariableTypeReportingRule>
9
+ */
7
10
class AssertTypeSpecifyingExtensionTest extends \PHPStan \Testing \RuleTestCase
8
11
{
9
12
@@ -138,11 +141,11 @@ public function testExtension(): void
138
141
107 ,
139
142
],
140
143
[
141
- 'Variable $aa is: PHPStan\Type\WebMozartAssert\Foo|string ' ,
144
+ 'Variable $aa is: class-string< PHPStan\Type\WebMozartAssert\Foo>|PHPStan\Type\WebMozartAssert\Foo ' ,
142
145
110 ,
143
146
],
144
147
[
145
- 'Variable $ab is: array<PHPStan\Type\WebMozartAssert\Foo> ' ,
148
+ 'Variable $ab is: array ' , // should array <PHPStan\Type\WebMozartAssert\Foo>
146
149
113 ,
147
150
],
148
151
[
Original file line number Diff line number Diff line change 5
5
use PhpParser \Node ;
6
6
use PHPStan \Analyser \Scope ;
7
7
8
+ /**
9
+ * @implements \PHPStan\Rules\Rule<Node\Expr\Variable>
10
+ */
8
11
class VariableTypeReportingRule implements \PHPStan \Rules \Rule
9
12
{
10
13
@@ -13,11 +16,6 @@ public function getNodeType(): string
13
16
return Node \Expr \Variable::class;
14
17
}
15
18
16
- /**
17
- * @param \PhpParser\Node\Expr\Variable $node
18
- * @param \PHPStan\Analyser\Scope $scope
19
- * @return string[] errors
20
- */
21
19
public function processNode (Node $ node , Scope $ scope ): array
22
20
{
23
21
if (!is_string ($ node ->name )) {
You can’t perform that action at this time.
0 commit comments