Skip to content

Commit d3044ee

Browse files
committed
Fix unknown constants as default parameter values
1 parent 353cb01 commit d3044ee

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"nette/utils": "dev-master as 3.1.99",
2222
"nikic/php-parser": "4.7.0",
2323
"ondram/ci-detector": "^3.4.0",
24-
"ondrejmirtes/better-reflection": "4.3.21",
24+
"ondrejmirtes/better-reflection": "4.3.22",
2525
"phpdocumentor/reflection-docblock": "4.3.4",
2626
"phpstan/phpdoc-parser": "^0.4.8",
2727
"react/child-process": "^0.6.1",

tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -342,4 +342,13 @@ public function testBug3478(): void
342342
$this->analyse([__DIR__ . '/data/bug-3478.php'], []);
343343
}
344344

345+
public function testBug3629(): void
346+
{
347+
if (!self::$useStaticReflectionProvider) {
348+
$this->markTestSkipped('Test require static reflection.');
349+
}
350+
$this->phpVersionId = PHP_VERSION_ID;
351+
$this->analyse([__DIR__ . '/data/bug-3629.php'], []);
352+
}
353+
345354
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Bug3629;
4+
5+
class HelloWorld extends \Thread
6+
{
7+
public function start(int $options = PTHREADS_INHERIT_ALL)
8+
{
9+
return parent::start($options);
10+
}
11+
}

0 commit comments

Comments
 (0)