-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeQuality] Keep identical false variable compare as is it is in Si…
…mplifyBoolIdenticalTrueRector (#2839)
- Loading branch information
1 parent
fadb6a4
commit 7215c28
Showing
5 changed files
with
38 additions
and
6 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
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
24 changes: 24 additions & 0 deletions
24
...uality/Rector/Identical/SimplifyBoolIdenticalTrueRector/Fixture/skip_equals_false.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,24 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector\Fixture; | ||
|
||
final class SkipEqualsFalse | ||
{ | ||
public function run(bool $value) | ||
{ | ||
if ($value === false) { | ||
return 'not yet'; | ||
} | ||
|
||
return 'yes'; | ||
} | ||
|
||
public function runFromTheOtherSide(bool $value) | ||
{ | ||
if (false === $value) { | ||
return 'not yet'; | ||
} | ||
|
||
return 'yes'; | ||
} | ||
} |
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