Skip to content

Commit 86eceaf

Browse files
committed
Cover a pure override of a @pure-unless-callable-is-impure method
1 parent 5e98824 commit 86eceaf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎tests/PHPStan/Rules/Methods/data/method-signature-pure-unless-callable.php‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,16 @@ public function run(callable $cb): int
6767
}
6868

6969
}
70+
71+
class PureChild implements PureUnlessParent
72+
{
73+
74+
/**
75+
* @phpstan-pure
76+
*/
77+
public function run(callable $cb): int
78+
{
79+
return 1;
80+
}
81+
82+
}

0 commit comments

Comments
 (0)