diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/Fixture/skip_union_type_on_php74.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/Fixture/skip_union_type_on_php74.php.inc new file mode 100644 index 00000000000..c743ebf08e6 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/Fixture/skip_union_type_on_php74.php.inc @@ -0,0 +1,23 @@ +getValue(); + } + + return $this->getNextValue(); + } + + private function getValue(): int|string + { + } + + private function getNextValue(): float|string + { + } +} diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/FixturePhp80/merge_union_types.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/FixturePhp80/merge_union_types.php.inc new file mode 100644 index 00000000000..c214114062d --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector/FixturePhp80/merge_union_types.php.inc @@ -0,0 +1,51 @@ +getValue(); + } + + return $this->getNextValue(); + } + + private function getValue(): int|string + { + } + + private function getNextValue(): float|string + { + } +} + +?> +----- +getValue(); + } + + return $this->getNextValue(); + } + + private function getValue(): int|string + { + } + + private function getNextValue(): float|string + { + } +} + +?>