-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#4608) * [Strict] Skip from docblock @return on DisallowedEmptyRuleFixerRector * [ci-review] Rector Rectify * Fixed 🎉 * fix * remove ArrayDimFetch feature * [ci-review] Rector Rectify * Revert "[ci-review] Rector Rectify" This reverts commit cf4f602. * Revert "remove ArrayDimFetch feature" This reverts commit d4a8040. * negated test * from return --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
c01925a
commit 65e6cae
Showing
4 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...ts/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector/Fixture/from_return_method.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,47 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
final class FromReturnCall | ||
{ | ||
public function run() | ||
{ | ||
return empty($this->getProperty()); | ||
} | ||
|
||
public function run2() | ||
{ | ||
return ! empty($this->getProperty()); | ||
} | ||
|
||
public function getProperty(): string | ||
{ | ||
return ''; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
final class FromReturnCall | ||
{ | ||
public function run() | ||
{ | ||
return $this->getProperty() === ''; | ||
} | ||
|
||
public function run2() | ||
{ | ||
return $this->getProperty() !== ''; | ||
} | ||
|
||
public function getProperty(): string | ||
{ | ||
return ''; | ||
} | ||
} | ||
|
||
?> |
23 changes: 23 additions & 0 deletions
23
...ct/Rector/Empty_/DisallowedEmptyRuleFixerRector/Fixture/skip_from_docblock_return.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,23 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
final class SkipFromDocblockReturn | ||
{ | ||
public function run() | ||
{ | ||
return empty($this->getProperty()); | ||
} | ||
|
||
public function run2() | ||
{ | ||
return ! empty($this->getProperty()); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getProperty() | ||
{ | ||
} | ||
} |
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