From 1e04b28051e23f89a9b373cf1c82316fe6fa206e Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 25 Dec 2024 00:41:15 +0700 Subject: [PATCH] fix --- .../Fixture/skip_assign2.php.inc | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 rules-tests/TypeDeclaration/Rector/BooleanAnd/BinaryOpNullableToInstanceofRector/Fixture/skip_assign2.php.inc diff --git a/rules-tests/TypeDeclaration/Rector/BooleanAnd/BinaryOpNullableToInstanceofRector/Fixture/skip_assign2.php.inc b/rules-tests/TypeDeclaration/Rector/BooleanAnd/BinaryOpNullableToInstanceofRector/Fixture/skip_assign2.php.inc new file mode 100644 index 0000000000..c835f01f4f --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/BooleanAnd/BinaryOpNullableToInstanceofRector/Fixture/skip_assign2.php.inc @@ -0,0 +1,24 @@ +someClass = $this->get()) && $this->someClass->someMethod()) { + return $this->someClass->someMethod(); + } + + return 'no'; + } + + private function get(): ?SomeInstance + { + return rand(0, 1) ? new SomeInstance() : null; + } +}