-
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Downgrade PHP 7.4] Add false to downgraded typed property (#1596)
Co-authored-by: Ondrej Mirtes <[email protected]> Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
8648410
commit 18fbe1d
Showing
5 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...ts/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector/Fixture/false_type.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture; | ||
|
||
class Foo | ||
{ | ||
|
||
private Foo|Bar|false $prop; | ||
|
||
} | ||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture; | ||
|
||
class Foo | ||
{ | ||
|
||
/** | ||
* @var \Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Bar|\Rector\Tests\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector\Fixture\Foo|false | ||
*/ | ||
private $prop; | ||
|
||
} | ||
?> |
26 changes: 26 additions & 0 deletions
26
...adePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector/Fixture/false_type.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture; | ||
|
||
class Foo | ||
{ | ||
|
||
private Foo|Bar|false $prop; | ||
|
||
} | ||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture; | ||
|
||
class Foo | ||
{ | ||
|
||
/** | ||
* @var \Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Bar|\Rector\Tests\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector\Fixture\Foo|false | ||
*/ | ||
private $prop; | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ class DoNotCrashOnNumericStringNoReturnDeclaration | |
} | ||
} | ||
|
||
?> | ||
?> |