Skip to content

Commit 6726c9f

Browse files
Add non regression test for #13267
1 parent f4fb852 commit 6726c9f

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,14 @@ public function testDynamicCall(): void
885885
]);
886886
}
887887

888+
public function testBug13267(): void
889+
{
890+
$this->checkThisOnly = false;
891+
$this->checkExplicitMixed = false;
892+
893+
$this->analyse([__DIR__ . '/data/bug-13267.php'], []);
894+
}
895+
888896
public function testRestrictedInternalClassNameUsage(): void
889897
{
890898
$this->checkThisOnly = false;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug13267;
4+
5+
class ExampleException extends \ErrorException {
6+
public function __construct(\Throwable $e) {
7+
parent::__construct(
8+
$e->getMessage(),
9+
$e->getCode(),
10+
1,
11+
$e->getFile(),
12+
$e->getLine(),
13+
$e->getPrevious(),
14+
);
15+
}
16+
}

0 commit comments

Comments
 (0)