Skip to content

Commit 56fd912

Browse files
committed
Update missing-exception-function-throws.php
1 parent 3967a38 commit 56fd912

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/PHPStan/Rules/Exceptions/data/missing-exception-function-throws.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,10 @@ function doBar3(): void
5656
{
5757
throw new \LogicException(); // error
5858
}
59+
60+
function bug13288(array $a): void
61+
{
62+
array_push($a, function() {
63+
throw new \LogicException(); // ok, as array_push() will not invoke the function
64+
});
65+
}

0 commit comments

Comments
 (0)