Skip to content

Commit c86721e

Browse files
Add test
1 parent 53eb552 commit c86721e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/PHPStan/Rules/Comparison/data/bug-13023.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,25 @@ public function getRandom(): int
166166
return $value * $value;
167167
}
168168
}
169+
170+
class SomeClass11
171+
{
172+
use MyTrait6;
173+
}
174+
175+
trait MyTrait6
176+
{
177+
public function getBar(): array
178+
{
179+
return [];
180+
}
181+
182+
public function getRandom(): int
183+
{
184+
if (!\is_int(count($this->getBar()))) {
185+
return 1;
186+
}
187+
188+
return 0;
189+
}
190+
}

0 commit comments

Comments
 (0)