-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #5010 SimplifiedNullReturnFixer - must run before VoidReturnFixer…
… (kubawerlos) This PR was squashed before being merged into the 2.15 branch. Discussion ---------- SimplifiedNullReturnFixer - must run before VoidReturnFixer Commits ------- d58e3cb SimplifiedNullReturnFixer - must run before VoidReturnFixer
- Loading branch information
Showing
4 changed files
with
27 additions
and
2 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
23 changes: 23 additions & 0 deletions
23
tests/Fixtures/Integration/priority/simplified_null_return,void_return.test
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,23 @@ | ||
--TEST-- | ||
Integration of fixers: simplified_null_return,void_return. | ||
--RULESET-- | ||
{"simplified_null_return": true, "void_return": true} | ||
--REQUIREMENTS-- | ||
{"php": 70100} | ||
--EXPECT-- | ||
<?php | ||
class Foo { | ||
public function bar(): void | ||
{ | ||
return; | ||
} | ||
} | ||
|
||
--INPUT-- | ||
<?php | ||
class Foo { | ||
public function bar() | ||
{ | ||
return null; | ||
} | ||
} |