diff --git a/test/Generator/AbstractGeneratorTest.php b/test/Generator/AbstractGeneratorTest.php index acc256bd..65629ee5 100644 --- a/test/Generator/AbstractGeneratorTest.php +++ b/test/Generator/AbstractGeneratorTest.php @@ -14,11 +14,20 @@ class AbstractGeneratorTest extends TestCase { public function testConstructor() { - $generator = $this->getMockForAbstractClass(AbstractGenerator::class, [ + $generator = $this->getMockForAbstractClass( + AbstractGenerator::class, [ - 'indentation' => 'foo', + [ + 'indentation' => 'foo', + ], ], - ]); + '', + true, + true, + true, + [], + false + ); self::assertInstanceOf(GeneratorInterface::class, $generator); self::assertSame('foo', $generator->getIndentation()); diff --git a/test/Generator/TestAsset/TestSampleSingleClass.php b/test/Generator/TestAsset/TestSampleSingleClass.php index 65d30a21..6dbd49f2 100644 --- a/test/Generator/TestAsset/TestSampleSingleClass.php +++ b/test/Generator/TestAsset/TestSampleSingleClass.php @@ -32,7 +32,7 @@ public function someMethod() protected function withParamsAndReturnType( $mixed, array $array, - callable $callable = null, + ?callable $callable = null, ?int $int = 0 ): bool { /* test test */ diff --git a/test/Reflection/TestAsset/TestSampleClass5.php b/test/Reflection/TestAsset/TestSampleClass5.php index abf21b02..5603c79b 100644 --- a/test/Reflection/TestAsset/TestSampleClass5.php +++ b/test/Reflection/TestAsset/TestSampleClass5.php @@ -34,7 +34,7 @@ class TestSampleClass5 * which spans multiple lines * @return mixed Some return descr */ - public function doSomething($one, $two = 2, $three = 'three', array $array = array(), TestSampleClass $class = null) + public function doSomething($one, $two = 2, $three = 'three', array $array = array(), ?TestSampleClass $class = null) { return 'mixedValue'; } @@ -63,7 +63,7 @@ public function doSomethingElse($one, $two = 2, $three = 'three') public function methodWithNotAllParamsDeclared( string $one, $two = null, - int $three = null, + ?int $three = null, string $four = '', $five = null ) { diff --git a/test/TestAsset/IterableHintsClass.php b/test/TestAsset/IterableHintsClass.php index 0e4358d1..2557f19b 100644 --- a/test/TestAsset/IterableHintsClass.php +++ b/test/TestAsset/IterableHintsClass.php @@ -12,7 +12,7 @@ public function nullableIterableParameter(?iterable $foo) { } - public function nullDefaultIterableParameter(iterable $foo = null) + public function nullDefaultIterableParameter(?iterable $foo = null) { } diff --git a/test/TestAsset/ObjectHintsClass.php b/test/TestAsset/ObjectHintsClass.php index 9e01f8d9..381f72ae 100644 --- a/test/TestAsset/ObjectHintsClass.php +++ b/test/TestAsset/ObjectHintsClass.php @@ -12,7 +12,7 @@ public function nullableObjectParameter(?object $foo) { } - public function nullDefaultObjectParameter(object $foo = null) + public function nullDefaultObjectParameter(?object $foo = null) { }