File tree Expand file tree Collapse file tree 6 files changed +26
-4
lines changed Expand file tree Collapse file tree 6 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1111 "phpstan/phpstan" : " 2.1.0" ,
1212 "phpunit/phpunit" : " ^9.5" ,
1313 "phpstan/extension-installer" : " ^1.0" ,
14- "phpstan/phpstan-strict-rules" : " ^2.0"
14+ "phpstan/phpstan-strict-rules" : " ^2.0" ,
15+ "phpstan/phpstan-phpunit" : " ^2.0"
1516 },
1617 "license" : " LGPL-3.0" ,
1718 "autoload" : {
Original file line number Diff line number Diff line change 11includes:
2+ - tests/phpstan/configs/expected-test-errors.neon
23 - tests/phpstan/configs/impossible-mixed.neon
34 - tests/phpstan/configs/phpstan-bugs.neon
45
@@ -7,3 +8,4 @@ parameters:
78 treatPhpDocTypesAsCertain: false
89 paths:
910 - src
11+ - tests
Original file line number Diff line number Diff line change 1+ parameters :
2+ ignoreErrors :
3+ -
4+ message : ' #^Expression "clone \$tag" on a separate line does not do anything\.$#'
5+ identifier : expr.resultUnused
6+ count : 1
7+ path : ../../phpunit/tag/CompoundTagTest.php
8+
9+ -
10+ message : ' #^Expression "clone \$tag" on a separate line does not do anything\.$#'
11+ identifier : expr.resultUnused
12+ count : 1
13+ path : ../../phpunit/tag/ListTagTest.php
Original file line number Diff line number Diff line change @@ -17,3 +17,9 @@ parameters:
1717 identifier : assign.propertyType
1818 count : 1
1919 path : ../../../src/tag/ListTag.php
20+
21+ -
22+ message : ' #^Call to function is_string\(\) with string will always evaluate to true\.$#'
23+ identifier : function.alreadyNarrowedType
24+ count : 1
25+ path : ../../phpunit/tag/CompoundTagTest.php
Original file line number Diff line number Diff line change @@ -56,13 +56,11 @@ public function testParseGarbage() : void{
5656
5757 public function testEmptyCompound () : void {
5858 $ tag = JsonNbtParser::parseJson ("{} " );
59- self ::assertNotNull ($ tag );
6059 self ::assertCount (0 , $ tag );
6160 }
6261
6362 public function testEmptyList () : void {
6463 $ tag = JsonNbtParser::parseJson ("{TestList:[]} " );
65- self ::assertNotNull ($ tag );
6664 $ list = $ tag ->getTag ("TestList " );
6765 self ::assertTrue ($ list instanceof ListTag);
6866 self ::assertCount (0 , $ list );
Original file line number Diff line number Diff line change @@ -129,7 +129,9 @@ public function testEquals() : void{
129129
130130 self ::assertTrue ($ tag1 ->equals ($ tag2 ));
131131
132- $ tag2 ->getCompoundTag ("child9 " )->setFloat ("hello " , 1.0 );
132+ $ child9 = $ tag2 ->getCompoundTag ("child9 " );
133+ self ::assertNotNull ($ child9 );
134+ $ child9 ->setFloat ("hello " , 1.0 );
133135 self ::assertNotTrue ($ tag1 ->equals ($ tag2 ));
134136 }
135137
You can’t perform that action at this time.
0 commit comments