Skip to content

Commit 53db374

Browse files
committed
...
1 parent 8cb4567 commit 53db374

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

src/tag/CompoundTag.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ public function setString(string $name, string $value) : self{
265265
}
266266

267267
/**
268-
* @param int[] $value
268+
* @param int[] $value
269+
* @phpstan-param list<int> $value
269270
*
270271
* @return $this
271272
*/

tests/phpstan/configs/impossible-mixed.neon

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,55 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getByte\\(\\) should return int but returns mixed\\.$#"
4+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getByte\(\) should return int but returns mixed\.$#'
5+
identifier: return.type
56
count: 1
67
path: ../../../src/tag/CompoundTag.php
78

89
-
9-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getByteArray\\(\\) should return string but returns mixed\\.$#"
10+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getByteArray\(\) should return string but returns mixed\.$#'
11+
identifier: return.type
1012
count: 1
1113
path: ../../../src/tag/CompoundTag.php
1214

1315
-
14-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getDouble\\(\\) should return float but returns mixed\\.$#"
16+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getDouble\(\) should return float but returns mixed\.$#'
17+
identifier: return.type
1518
count: 1
1619
path: ../../../src/tag/CompoundTag.php
1720

1821
-
19-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getFloat\\(\\) should return float but returns mixed\\.$#"
22+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getFloat\(\) should return float but returns mixed\.$#'
23+
identifier: return.type
2024
count: 1
2125
path: ../../../src/tag/CompoundTag.php
2226

2327
-
24-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getInt\\(\\) should return int but returns mixed\\.$#"
28+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getInt\(\) should return int but returns mixed\.$#'
29+
identifier: return.type
2530
count: 1
2631
path: ../../../src/tag/CompoundTag.php
2732

2833
-
29-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getIntArray\\(\\) should return array\\<int\\> but returns mixed\\.$#"
34+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getIntArray\(\) should return array\<int\> but returns mixed\.$#'
35+
identifier: return.type
3036
count: 1
3137
path: ../../../src/tag/CompoundTag.php
3238

3339
-
34-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getLong\\(\\) should return int but returns mixed\\.$#"
40+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getLong\(\) should return int but returns mixed\.$#'
41+
identifier: return.type
3542
count: 1
3643
path: ../../../src/tag/CompoundTag.php
3744

3845
-
39-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getShort\\(\\) should return int but returns mixed\\.$#"
46+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getShort\(\) should return int but returns mixed\.$#'
47+
identifier: return.type
4048
count: 1
4149
path: ../../../src/tag/CompoundTag.php
4250

4351
-
44-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getString\\(\\) should return string but returns mixed\\.$#"
52+
message: '#^Method pocketmine\\nbt\\tag\\CompoundTag\:\:getString\(\) should return string but returns mixed\.$#'
53+
identifier: return.type
4554
count: 1
4655
path: ../../../src/tag/CompoundTag.php
47-
+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Call to function is_int\\(\\) with int will always evaluate to true\\.$#"
4+
message: '#^Call to function is_int\(\) with int will always evaluate to true\.$#'
5+
identifier: function.alreadyNarrowedType
56
count: 1
67
path: ../../../src/tag/IntArrayTag.php
78

9+
-
10+
message: '#^Parameter \#1 \$array \(list\<int\>\) of array_values is already a list, call has no effect\.$#'
11+
identifier: arrayValues.list
12+
count: 1
13+
path: ../../../src/tag/IntArrayTag.php

0 commit comments

Comments
 (0)