diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-18 14:28:32 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-18 14:28:32 +0200 |
| commit | c5401854fcea27ff9aabfd0682ff4d81bbb3c888 (patch) | |
| tree | f6b8e94b80d682da470133f0771fa83182d2226e /Zend | |
| parent | bfceb710becab71d7d561d64667be4c9668b6a9c (diff) | |
| download | php-git-c5401854fcea27ff9aabfd0682ff4d81bbb3c888.tar.gz | |
Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
Diffstat (limited to 'Zend')
43 files changed, 171 insertions, 171 deletions
diff --git a/Zend/tests/attributes/001_placement.phpt b/Zend/tests/attributes/001_placement.phpt index 7de2210460..518c890ef2 100644 --- a/Zend/tests/attributes/001_placement.phpt +++ b/Zend/tests/attributes/001_placement.phpt @@ -41,8 +41,8 @@ $sources = [ ]; foreach ($sources as $r) { - $attr = $r->getAttributes(); - var_dump(get_class($r), count($attr)); + $attr = $r->getAttributes(); + var_dump(get_class($r), count($attr)); foreach ($attr as $a) { var_dump($a->getName(), $a->getArguments()); diff --git a/Zend/tests/attributes/003_ast_nodes.phpt b/Zend/tests/attributes/003_ast_nodes.phpt index 0177804dcc..854edf3d63 100644 --- a/Zend/tests/attributes/003_ast_nodes.phpt +++ b/Zend/tests/attributes/003_ast_nodes.phpt @@ -8,7 +8,7 @@ define('V1', strtoupper(php_sapi_name())); #[A1([V1 => V1])] class C1 { - public const BAR = 'bar'; + public const BAR = 'bar'; } $ref = new \ReflectionClass(C1::class); @@ -38,7 +38,7 @@ echo "\n"; #[A1(self::FOO, C1::BAR)] class C3 { - private const FOO = 'foo'; + private const FOO = 'foo'; } $ref = new \ReflectionClass(C3::class); @@ -62,7 +62,7 @@ echo "\n"; #[Attribute] class C5 { - public function __construct() { } + public function __construct() { } } $ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { }); @@ -70,15 +70,15 @@ $attr = $ref->getAttributes(); var_dump(count($attr)); try { - $attr[0]->getArguments(); + $attr[0]->getArguments(); } catch (\Error $e) { - var_dump($e->getMessage()); + var_dump($e->getMessage()); } try { - $attr[0]->newInstance(); + $attr[0]->newInstance(); } catch (\Error $e) { - var_dump($e->getMessage()); + var_dump($e->getMessage()); } ?> diff --git a/Zend/tests/attributes/005_objects.phpt b/Zend/tests/attributes/005_objects.phpt index 206d89fa10..62b14181ef 100644 --- a/Zend/tests/attributes/005_objects.phpt +++ b/Zend/tests/attributes/005_objects.phpt @@ -6,22 +6,22 @@ Attributes can be converted into objects. #[Attribute(Attribute::TARGET_FUNCTION)] class A1 { - public string $name; - public int $ttl; - - public function __construct(string $name, int $ttl = 50) - { - $this->name = $name; - $this->ttl = $ttl; - } + public string $name; + public int $ttl; + + public function __construct(string $name, int $ttl = 50) + { + $this->name = $name; + $this->ttl = $ttl; + } } $ref = new \ReflectionFunction(#[A1('test')] function () { }); foreach ($ref->getAttributes() as $attr) { - $obj = $attr->newInstance(); + $obj = $attr->newInstance(); - var_dump(get_class($obj), $obj->name, $obj->ttl); + var_dump(get_class($obj), $obj->name, $obj->ttl); } echo "\n"; @@ -29,9 +29,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A1] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\ArgumentCountError $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } echo "\n"; @@ -39,9 +39,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A1([])] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\TypeError $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } echo "\n"; @@ -49,9 +49,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A2] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 3', $e->getMessage()); + var_dump('ERROR 3', $e->getMessage()); } echo "\n"; @@ -59,15 +59,15 @@ echo "\n"; #[Attribute] class A3 { - private function __construct() { } + private function __construct() { } } $ref = new \ReflectionFunction(#[A3] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 4', $e->getMessage()); + var_dump('ERROR 4', $e->getMessage()); } echo "\n"; @@ -78,9 +78,9 @@ class A4 { } $ref = new \ReflectionFunction(#[A4(1)] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 5', $e->getMessage()); + var_dump('ERROR 5', $e->getMessage()); } echo "\n"; @@ -90,9 +90,9 @@ class A5 { } $ref = new \ReflectionFunction(#[A5] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 6', $e->getMessage()); + var_dump('ERROR 6', $e->getMessage()); } ?> diff --git a/Zend/tests/attributes/006_filter.phpt b/Zend/tests/attributes/006_filter.phpt index 8da1ec9bde..2924e6ed79 100644 --- a/Zend/tests/attributes/006_filter.phpt +++ b/Zend/tests/attributes/006_filter.phpt @@ -55,17 +55,17 @@ echo "\n"; $ref = new \ReflectionFunction(function () { }); try { - $ref->getAttributes(A1::class, 3); + $ref->getAttributes(A1::class, 3); } catch (\Error $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } $ref = new \ReflectionFunction(function () { }); try { - $ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF); + $ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF); } catch (\Error $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } ?> diff --git a/Zend/tests/attributes/011_inheritance.phpt b/Zend/tests/attributes/011_inheritance.phpt index 36ee3fa47a..6a589b9253 100644 --- a/Zend/tests/attributes/011_inheritance.phpt +++ b/Zend/tests/attributes/011_inheritance.phpt @@ -6,19 +6,19 @@ Attributes comply with inheritance rules. #[A2] class C1 { - #[A1] - public function foo() { } + #[A1] + public function foo() { } } class C2 extends C1 { - public function foo() { } + public function foo() { } } class C3 extends C1 { - #[A1] - public function bar() { } + #[A1] + public function bar() { } } $ref = new \ReflectionClass(C1::class); @@ -37,20 +37,20 @@ echo "\n"; trait T1 { - #[A2] - public $a; + #[A2] + public $a; } class C4 { - use T1; + use T1; } class C5 { - use T1; + use T1; - public $a; + public $a; } $ref = new \ReflectionClass(T1::class); diff --git a/Zend/tests/attributes/012_ast_export.phpt b/Zend/tests/attributes/012_ast_export.phpt index a9131f92d0..347d1befe7 100644 --- a/Zend/tests/attributes/012_ast_export.phpt +++ b/Zend/tests/attributes/012_ast_export.phpt @@ -12,15 +12,15 @@ assert(0 && ($a = #[A1] #[A2] function ($a, #[A3(1)] $b) { })); assert(0 && ($a = #[A1(1, 2, 1 + 2)] fn () => 1)); assert(0 && ($a = new #[A1] class() { - #[A1]#[A2] const FOO = 'foo'; - #[A2] public $x; - #[A3] function a() { } + #[A1]#[A2] const FOO = 'foo'; + #[A2] public $x; + #[A3] function a() { } })); assert(0 && ($a = function () { - #[A1] class Test1 { } - #[A2] interface Test2 { } - #[A3] trait Test3 { } + #[A1] class Test1 { } + #[A2] interface Test2 { } + #[A3] trait Test3 { } })); ?> diff --git a/Zend/tests/attributes/013_class_scope.phpt b/Zend/tests/attributes/013_class_scope.phpt index 61dd9f594c..ff16bb7b82 100644 --- a/Zend/tests/attributes/013_class_scope.phpt +++ b/Zend/tests/attributes/013_class_scope.phpt @@ -6,14 +6,14 @@ Attributes make use of class scope. #[A1(self::class, self::FOO)] class C1 { - #[A1(self::class, self::FOO)] - private const FOO = 'foo'; + #[A1(self::class, self::FOO)] + private const FOO = 'foo'; - #[A1(self::class, self::FOO)] - public $a; + #[A1(self::class, self::FOO)] + public $a; - #[A1(self::class, self::FOO)] - public function bar(#[A1(self::class, self::FOO)] $p) { } + #[A1(self::class, self::FOO)] + public function bar(#[A1(self::class, self::FOO)] $p) { } } $ref = new \ReflectionClass(C1::class); @@ -27,15 +27,15 @@ echo "\n"; trait T1 { - #[A1(self::class, self::FOO)] - public function foo() { } + #[A1(self::class, self::FOO)] + public function foo() { } } class C2 { - use T1; + use T1; - private const FOO = 'bar'; + private const FOO = 'bar'; } $ref = new \ReflectionClass(C2::class); @@ -45,7 +45,7 @@ $ref = new \ReflectionClass(T1::class); $attr = $ref->getMethod('foo')->getAttributes()[0]; try { - $attr->getArguments(); + $attr->getArguments(); } catch (\Error $e) { var_dump('ERROR 1', $e->getMessage()); } @@ -54,17 +54,17 @@ echo "\n"; class C3 { - private const FOO = 'foo'; + private const FOO = 'foo'; - public static function foo() - { - return new #[A1(self::class, self::FOO)] class() { - private const FOO = 'bar'; + public static function foo() + { + return new #[A1(self::class, self::FOO)] class() { + private const FOO = 'bar'; - #[A1(self::class, self::FOO)] - public function bar() { } - }; - } + #[A1(self::class, self::FOO)] + public function bar() { } + }; + } } $ref = new \ReflectionObject(C3::foo()); diff --git a/Zend/tests/attributes/014_class_const_group.phpt b/Zend/tests/attributes/014_class_const_group.phpt index a53ed09c0a..9f01d013a7 100644 --- a/Zend/tests/attributes/014_class_const_group.phpt +++ b/Zend/tests/attributes/014_class_const_group.phpt @@ -5,8 +5,8 @@ Attributes cannot be applied to groups of class constants. class C1 { - #[A1] - public const A = 1, B = 2; + #[A1] + public const A = 1, B = 2; } ?> diff --git a/Zend/tests/attributes/015_property_group.phpt b/Zend/tests/attributes/015_property_group.phpt index 484d4154cf..b84ded8c38 100644 --- a/Zend/tests/attributes/015_property_group.phpt +++ b/Zend/tests/attributes/015_property_group.phpt @@ -5,8 +5,8 @@ Attributes cannot be applied to groups of properties. class C1 { - #[A1] - public $x, $y; + #[A1] + public $x, $y; } ?> diff --git a/Zend/tests/attributes/017_closure_scope.phpt b/Zend/tests/attributes/017_closure_scope.phpt index af7de8e2e8..8c39ceede9 100644 --- a/Zend/tests/attributes/017_closure_scope.phpt +++ b/Zend/tests/attributes/017_closure_scope.phpt @@ -5,17 +5,17 @@ Attributes make use of closure scope. class Test1 { - private const FOO = 'bar'; + private const FOO = 'bar'; } class C1 { - private const FOO = 'foo'; + private const FOO = 'foo'; - public static function foo() - { - return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { }; - } + public static function foo() + { + return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { }; + } } $ref = new \ReflectionFunction(C1::foo()); diff --git a/Zend/tests/attributes/020_userland_attribute_validation.phpt b/Zend/tests/attributes/020_userland_attribute_validation.phpt index 14a10c39b2..ce2acb26db 100644 --- a/Zend/tests/attributes/020_userland_attribute_validation.phpt +++ b/Zend/tests/attributes/020_userland_attribute_validation.phpt @@ -18,9 +18,9 @@ $attr = $ref->getAttributes()[0]; var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_CLASS, $attr->isRepeated()); try { - $attr->newInstance(); + $attr->newInstance(); } catch (\Throwable $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } echo "\n"; @@ -30,9 +30,9 @@ $attr = $ref->getAttributes()[0]; var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_FUNCTION, $attr->isRepeated()); try { - $attr->newInstance(); + $attr->newInstance(); } catch (\Throwable $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } echo "\n"; diff --git a/Zend/tests/attributes/027_trailing_comma_args.phpt b/Zend/tests/attributes/027_trailing_comma_args.phpt index 226025f359..96966c364d 100644 --- a/Zend/tests/attributes/027_trailing_comma_args.phpt +++ b/Zend/tests/attributes/027_trailing_comma_args.phpt @@ -4,10 +4,10 @@ Trailing comma in attribute argument list <?php #[MyAttribute( - "there", - "are", - "many", - "arguments", + "there", + "are", + "many", + "arguments", )] class Foo { } diff --git a/Zend/tests/bug40770.phpt b/Zend/tests/bug40770.phpt index c4c78c2220..f37d96d5ff 100644 --- a/Zend/tests/bug40770.phpt +++ b/Zend/tests/bug40770.phpt @@ -6,7 +6,7 @@ memory_limit=8M <?php $zend_mm_enabled = getenv("USE_ZEND_ALLOC"); if ($zend_mm_enabled === "0") { - die("skip Zend MM disabled"); + die("skip Zend MM disabled"); } ?> --FILE-- diff --git a/Zend/tests/bug54268.phpt b/Zend/tests/bug54268.phpt index 1680f4ceed..e4ce5c0e3a 100644 --- a/Zend/tests/bug54268.phpt +++ b/Zend/tests/bug54268.phpt @@ -6,7 +6,7 @@ memory_limit=8M <?php $zend_mm_enabled = getenv("USE_ZEND_ALLOC"); if ($zend_mm_enabled === "0") { - die("skip Zend MM disabled"); + die("skip Zend MM disabled"); } ?> --FILE-- diff --git a/Zend/tests/bug54547.phpt b/Zend/tests/bug54547.phpt index 7cb0cf0664..2f6387ca26 100644 --- a/Zend/tests/bug54547.phpt +++ b/Zend/tests/bug54547.phpt @@ -3,7 +3,7 @@ Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs --SKIPIF-- <?php if (PHP_INT_MAX !== 9223372036854775807) - die("skip for 64-bit long systems only"); + die("skip for 64-bit long systems only"); --FILE-- <?php var_dump("9223372036854775807" == "9223372036854775808"); diff --git a/Zend/tests/bug62097.phpt b/Zend/tests/bug62097.phpt index 8b78e6c691..52dd7499dc 100644 --- a/Zend/tests/bug62097.phpt +++ b/Zend/tests/bug62097.phpt @@ -3,7 +3,7 @@ Bug #62097: fix for bug #54547 is wrong for 32-bit machines --SKIPIF-- <?php if (PHP_INT_MAX !== 2147483647) - die('skip for system with 32-bit wide longs only'); + die('skip for system with 32-bit wide longs only'); --FILE-- <?php var_dump("02147483647" == "2147483647", diff --git a/Zend/tests/bug70258.phpt b/Zend/tests/bug70258.phpt index 11f59dd95b..40915a286e 100644 --- a/Zend/tests/bug70258.phpt +++ b/Zend/tests/bug70258.phpt @@ -6,7 +6,7 @@ memory_limit=2M <?php $zend_mm_enabled = getenv("USE_ZEND_ALLOC"); if ($zend_mm_enabled === "0") { - die("skip Zend MM disabled"); + die("skip Zend MM disabled"); } ?> --FILE-- diff --git a/Zend/tests/bug70914.phpt b/Zend/tests/bug70914.phpt index 2ea1b91241..b8a1c91d36 100644 --- a/Zend/tests/bug70914.phpt +++ b/Zend/tests/bug70914.phpt @@ -3,7 +3,7 @@ Bug #70914 zend_throw_or_error() format string vulnerability --SKIPIF-- <?php if (!extension_loaded("pdo_sqlite")) { - die("skip pdo_sqlite required"); + die("skip pdo_sqlite required"); } ?> --FILE-- diff --git a/Zend/tests/bug76846.phpt b/Zend/tests/bug76846.phpt index fbef201033..cd837bd860 100644 --- a/Zend/tests/bug76846.phpt +++ b/Zend/tests/bug76846.phpt @@ -6,7 +6,7 @@ memory_limit=33M <?php $zend_mm_enabled = getenv("USE_ZEND_ALLOC"); if ($zend_mm_enabled === "0") { - die("skip Zend MM disabled"); + die("skip Zend MM disabled"); } ?> --FILE-- diff --git a/Zend/tests/bug79599.phpt b/Zend/tests/bug79599.phpt index b333f153a8..57e5332431 100644 --- a/Zend/tests/bug79599.phpt +++ b/Zend/tests/bug79599.phpt @@ -3,23 +3,23 @@ Bug #79599 (coredump in set_error_handler) --FILE-- <?php set_error_handler(function($code, $message){ - throw new \Exception($message); + throw new \Exception($message); }); function test1(){ - $a[] = $b; + $a[] = $b; } function test2(){ - $a[$c] = $b; + $a[$c] = $b; } try{ - test1(); + test1(); }catch(\Exception $e){ - var_dump($e->getMessage()); + var_dump($e->getMessage()); } try{ - test2(); + test2(); }catch(\Exception $e){ - var_dump($e->getMessage()); + var_dump($e->getMessage()); } ?> --EXPECT-- diff --git a/Zend/tests/bug80037.phpt b/Zend/tests/bug80037.phpt index 7bbe6128b3..d6e057546b 100644 --- a/Zend/tests/bug80037.phpt +++ b/Zend/tests/bug80037.phpt @@ -5,21 +5,21 @@ Bug #80037: Typed property must not be accessed before initialization when __get final class A { - public string $a; + public string $a; - public static function fromArray(array $props): self - { - $me = new static; - foreach ($props as $k => &$v) { - $me->{$k} = &$v; # try to remove & - } - return $me; - } + public static function fromArray(array $props): self + { + $me = new static; + foreach ($props as $k => &$v) { + $me->{$k} = &$v; # try to remove & + } + return $me; + } - public function __get($name) - { - throw new \LogicException("Property '$name' is not defined."); - } + public function __get($name) + { + throw new \LogicException("Property '$name' is not defined."); + } } var_dump(A::fromArray(['a' => 'foo'])); diff --git a/Zend/tests/dval_to_lval_32.phpt b/Zend/tests/dval_to_lval_32.phpt index 9aeea65060..89acf9076a 100644 --- a/Zend/tests/dval_to_lval_32.phpt +++ b/Zend/tests/dval_to_lval_32.phpt @@ -3,7 +3,7 @@ zend_dval_to_lval preserves low bits (32 bit long) --SKIPIF-- <?php if (PHP_INT_SIZE != 4) - die("skip for machines with 32-bit longs"); + die("skip for machines with 32-bit longs"); ?> --FILE-- <?php diff --git a/Zend/tests/dval_to_lval_64.phpt b/Zend/tests/dval_to_lval_64.phpt index 3d6b736b8f..b54f861bf5 100644 --- a/Zend/tests/dval_to_lval_64.phpt +++ b/Zend/tests/dval_to_lval_64.phpt @@ -3,7 +3,7 @@ zend_dval_to_lval preserves low bits (64 bit long) --SKIPIF-- <?php if (PHP_INT_SIZE != 8) - die("skip for machines with 64-bit longs"); + die("skip for machines with 64-bit longs"); ?> --FILE-- <?php diff --git a/Zend/tests/generators/repeated_yield_from_with_immediate_release.phpt b/Zend/tests/generators/repeated_yield_from_with_immediate_release.phpt index 48813704b6..e6ab4e3c6c 100644 --- a/Zend/tests/generators/repeated_yield_from_with_immediate_release.phpt +++ b/Zend/tests/generators/repeated_yield_from_with_immediate_release.phpt @@ -4,10 +4,10 @@ A generator can be yielded from multiple times, testing immediate release of the <?php function gen() { - yield 42; + yield 42; } function yield_from($gen) { - yield from $gen; + yield from $gen; } $gen = gen(); var_dump(yield_from($gen)->current()); diff --git a/Zend/tests/magic_methods_011.phpt b/Zend/tests/magic_methods_011.phpt index 5ce536ae40..7cd4d4bee1 100644 --- a/Zend/tests/magic_methods_011.phpt +++ b/Zend/tests/magic_methods_011.phpt @@ -3,7 +3,7 @@ __set first parameter should be a string when typed --FILE-- <?php class Foo { - function __set(\Countable $name, $value) {} + function __set(\Countable $name, $value) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_012.phpt b/Zend/tests/magic_methods_012.phpt index 4ac3952c4d..450c7b2295 100644 --- a/Zend/tests/magic_methods_012.phpt +++ b/Zend/tests/magic_methods_012.phpt @@ -3,7 +3,7 @@ __get first parameter should be a string when typed --FILE-- <?php class Foo { - function __get(int $name) {} + function __get(int $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_013.phpt b/Zend/tests/magic_methods_013.phpt index 03a4fb7ea7..95614779d5 100644 --- a/Zend/tests/magic_methods_013.phpt +++ b/Zend/tests/magic_methods_013.phpt @@ -3,7 +3,7 @@ __isset first parameter should be a string when typed --FILE-- <?php class Foo { - function __isset(\stdClass $name) {} + function __isset(\stdClass $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_014.phpt b/Zend/tests/magic_methods_014.phpt index 783b6003dc..8a1aa6388d 100644 --- a/Zend/tests/magic_methods_014.phpt +++ b/Zend/tests/magic_methods_014.phpt @@ -3,7 +3,7 @@ __unset first parameter should be a string when typed --FILE-- <?php class Foo { - function __unset(array $name) {} + function __unset(array $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_015.phpt b/Zend/tests/magic_methods_015.phpt index d5e93c9ef0..3b7cf69618 100644 --- a/Zend/tests/magic_methods_015.phpt +++ b/Zend/tests/magic_methods_015.phpt @@ -3,7 +3,7 @@ __call first parameter should be a string typed --FILE-- <?php class Foo { - function __call(int $name, array $arguments) {} + function __call(int $name, array $arguments) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_016.phpt b/Zend/tests/magic_methods_016.phpt index a0ac45e42a..c456afa127 100644 --- a/Zend/tests/magic_methods_016.phpt +++ b/Zend/tests/magic_methods_016.phpt @@ -3,7 +3,7 @@ __call second parameter should be an array when typed --FILE-- <?php class Foo { - function __call(string $name, \Arguments $arguments) {} + function __call(string $name, \Arguments $arguments) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_017.phpt b/Zend/tests/magic_methods_017.phpt index 9afb089f31..0ce6227123 100644 --- a/Zend/tests/magic_methods_017.phpt +++ b/Zend/tests/magic_methods_017.phpt @@ -3,7 +3,7 @@ __callStatic first parameter should be a string typed --FILE-- <?php class Foo { - static function __callStatic(int $name, array $arguments) {} + static function __callStatic(int $name, array $arguments) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_018.phpt b/Zend/tests/magic_methods_018.phpt index faddd3cca1..914a889808 100644 --- a/Zend/tests/magic_methods_018.phpt +++ b/Zend/tests/magic_methods_018.phpt @@ -3,7 +3,7 @@ __callStatic second parameter should be an array typed --FILE-- <?php class Foo { - static function __callStatic(string $name, \Arguments $args) {} + static function __callStatic(string $name, \Arguments $args) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_019.phpt b/Zend/tests/magic_methods_019.phpt index 85823e6c40..f0a5fabff2 100644 --- a/Zend/tests/magic_methods_019.phpt +++ b/Zend/tests/magic_methods_019.phpt @@ -3,7 +3,7 @@ __unserialize first parameter must be an array --FILE-- <?php class Foo { - public function __unserialize(string $name) {} + public function __unserialize(string $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_020.phpt b/Zend/tests/magic_methods_020.phpt index 45e144cac7..4efaf6fb18 100644 --- a/Zend/tests/magic_methods_020.phpt +++ b/Zend/tests/magic_methods_020.phpt @@ -4,7 +4,7 @@ __set_state first parameter must be an array <?php class Foo { - public static function __set_state(int $properties) {} + public static function __set_state(int $properties) {} } ?> diff --git a/Zend/tests/magic_methods_inheritance_rules.phpt b/Zend/tests/magic_methods_inheritance_rules.phpt index e91fdc7848..6bdcafb1bf 100644 --- a/Zend/tests/magic_methods_inheritance_rules.phpt +++ b/Zend/tests/magic_methods_inheritance_rules.phpt @@ -3,65 +3,65 @@ Magic Methods inheritance rules --FILE-- <?php class ValidMagicMethods { - public function __call(string $name, array $arguments): mixed {} + public function __call(string $name, array $arguments): mixed {} - public static function __callStatic(string $name, array $arguments): mixed {} + public static function __callStatic(string $name, array $arguments): mixed {} - public function __clone(): void {} + public function __clone(): void {} - public function __debugInfo(): ?array {} + public function __debugInfo(): ?array {} - public function __get(string $name): mixed {} + public function __get(string $name): mixed {} - public function __invoke(mixed $arguments): mixed {} + public function __invoke(mixed $arguments): mixed {} - public function __isset(string $name): bool {} + public function __isset(string $name): bool {} - public function __serialize(): array {} + public function __serialize(): array {} - public function __set(string $name, mixed $value): void {} + public function __set(string $name, mixed $value): void {} - public static function __set_state(array $properties): object {} + public static function __set_state(array $properties): object {} - public function __sleep(): array {} + public function __sleep(): array {} - public function __toString(): string {} + public function __toString(): string {} - public function __unserialize(array $data): void {} + public function __unserialize(array $data): void {} - public function __unset(string $name): void {} + public function __unset(string $name): void {} - public function __wakeup(): void {} + public function __wakeup(): void {} } class NarrowedReturnType extends ValidMagicMethods { - public function __call(string $name, array $arguments): string|float|null {} + public function __call(string $name, array $arguments): string|float|null {} - public static function __callStatic(string $name, array $arguments): ?array {} + public static function __callStatic(string $name, array $arguments): ?array {} - public function __debugInfo(): array {} + public function __debugInfo(): array {} - public function __get(string $name): int|string {} + public function __get(string $name): int|string {} - public function __invoke(mixed $arguments): object {} + public function __invoke(mixed $arguments): object {} } class WidenedArgumentType extends NarrowedReturnType { - public function __call(string|array $name, array|string $arguments): string|float|null {} + public function __call(string|array $name, array|string $arguments): string|float|null {} - public static function __callStatic(string|object $name, array|object $arguments): ?array {} + public static function __callStatic(string|object $name, array|object $arguments): ?array {} - public function __get(string|array $name): int|string {} + public function __get(string|array $name): int|string {} - public function __isset(string|bool $name): bool {} + public function __isset(string|bool $name): bool {} - public function __set(string|bool|float $name, mixed $value): void {} + public function __set(string|bool|float $name, mixed $value): void {} - public static function __set_state(string|array $properties): object {} + public static function __set_state(string|array $properties): object {} - public function __unserialize(array|string $data): void {} + public function __unserialize(array|string $data): void {} - public function __unset(string|array $name): void {} + public function __unset(string|array $name): void {} } echo 'No problems!'; diff --git a/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt b/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt index a57c8b7dc8..84a960240a 100644 --- a/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt +++ b/Zend/tests/magic_methods_inheritance_rules_non_trivial_01.phpt @@ -3,15 +3,15 @@ Magic Methods inheritance rules on a non-trivial class hierarchy --FILE-- <?php class A { - public function __get(string|array $name): mixed {} // valid + public function __get(string|array $name): mixed {} // valid } class B extends A { - public function __get(string|array|object $name): int {} // also valid + public function __get(string|array|object $name): int {} // also valid } class C extends B { - public function __get(string|array $name): int {} // this is invalid + public function __get(string|array $name): int {} // this is invalid } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt index 72c20a7885..2835b46830 100644 --- a/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt +++ b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt @@ -3,15 +3,15 @@ Magic Methods inheritance rules on a non-trivial class hierarchy --FILE-- <?php class A { - public function __get(string|array $name): mixed {} // valid + public function __get(string|array $name): mixed {} // valid } class B extends A { - public function __get(string|array|object $name): int {} // also valid + public function __get(string|array|object $name): int {} // also valid } class C extends B { - public function __get(string|array|object $name): int|float {} // this is invalid + public function __get(string|array|object $name): int|float {} // this is invalid } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_sleep.phpt b/Zend/tests/magic_methods_sleep.phpt index 593d8fc037..89baac4699 100644 --- a/Zend/tests/magic_methods_sleep.phpt +++ b/Zend/tests/magic_methods_sleep.phpt @@ -3,7 +3,7 @@ __sleep cannot take arguments --FILE-- <?php class Foo { - public function __sleep(string $name) {} + public function __sleep(string $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/magic_methods_wakeup.phpt b/Zend/tests/magic_methods_wakeup.phpt index f4edb33576..8d72b6be86 100644 --- a/Zend/tests/magic_methods_wakeup.phpt +++ b/Zend/tests/magic_methods_wakeup.phpt @@ -3,7 +3,7 @@ __wakeup cannot take arguments --FILE-- <?php class Foo { - public function __wakeup(string $name) {} + public function __wakeup(string $name) {} } ?> --EXPECTF-- diff --git a/Zend/tests/return_types/033.phpt b/Zend/tests/return_types/033.phpt index e725465253..1eb5171cb0 100644 --- a/Zend/tests/return_types/033.phpt +++ b/Zend/tests/return_types/033.phpt @@ -3,7 +3,7 @@ __set can only declare void return --FILE-- <?php class Foo { - function __set($name, $value) : string {} + function __set($name, $value) : string {} } ?> --EXPECTF-- diff --git a/Zend/tests/return_types/034.phpt b/Zend/tests/return_types/034.phpt index 50324208cb..80a57cf1e8 100644 --- a/Zend/tests/return_types/034.phpt +++ b/Zend/tests/return_types/034.phpt @@ -3,7 +3,7 @@ __isset can only declare a boolean return type --FILE-- <?php class Foo { - function __isset($name) : \stdClass|bool {} + function __isset($name) : \stdClass|bool {} } ?> --EXPECTF-- diff --git a/Zend/tests/return_types/035.phpt b/Zend/tests/return_types/035.phpt index fa2d331f55..359790b82e 100644 --- a/Zend/tests/return_types/035.phpt +++ b/Zend/tests/return_types/035.phpt @@ -3,7 +3,7 @@ __unset can only declare void return --FILE-- <?php class Foo { - function __unset($name) : bool {} + function __unset($name) : bool {} } ?> --EXPECTF-- diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index 4e2351869d..177cf5c75d 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -262,7 +262,7 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */ OBJ_RELEASE(&parent->std); /* Reset for resuming in finally */ generator->node.parent = NULL; - generator->node.ptr.root = generator; + generator->node.ptr.root = generator; } } |
