File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 6
6
],
7
7
"require" : {
8
8
"php" : " ~7.1" ,
9
- "phpstan/phpstan" : " ~0.10 "
9
+ "phpstan/phpstan" : " ~0.11 "
10
10
},
11
11
"require-dev" : {
12
12
"nette/tester" : " ~2.0" ,
Original file line number Diff line number Diff line change @@ -83,7 +83,9 @@ public function getTypeFromMethodCall(
83
83
$ entityType = new ObjectType (IEntity::class);
84
84
} else {
85
85
assert ($ entityClassNameTypes instanceof ConstantArrayType);
86
- $ classNameType = $ entityClassNameTypes ->getFirstValueType ();
86
+ $ classNameTypes = $ entityClassNameTypes ->getValueTypes ();
87
+ assert (count ($ classNameTypes ) > 0 );
88
+ $ classNameType = $ classNameTypes [0 ];
87
89
assert ($ classNameType instanceof ConstantStringType);
88
90
$ entityType = new ObjectType ($ classNameType ->getValue ());
89
91
}
Original file line number Diff line number Diff line change 10
10
11
11
Environment::setup ();
12
12
13
- $ command = __DIR__ . '/../vendor/bin/phpstan analyze --no-progress -l 7 -c ' . __DIR__ . '/config.neon --errorFormat rawSimple ' . __DIR__ . '/testbox ' ;
13
+ $ command = __DIR__ . '/../vendor/bin/phpstan analyze --no-progress -l 7 -c ' . __DIR__ . '/config.neon --error-format rawSimple ' . __DIR__ . '/testbox ' ;
14
14
exec ($ command , $ o );
15
15
$ actual = trim (implode ("\n" , $ o ));
16
16
$ expected = trim (file_get_contents (__DIR__ . '/expected.txt ' ));
You can’t perform that action at this time.
0 commit comments