-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Strict] Skip empty() from param doc on DisallowedEmptyRuleFixerRector (
- Loading branch information
1 parent
e2ec807
commit 8c5507f
Showing
6 changed files
with
54 additions
and
66 deletions.
There are no files selected for viewing
33 changes: 0 additions & 33 deletions
33
...sts/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector/Fixture/multi_union_types.php.inc
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
...s/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector/Fixture/negated_union-types.php.inc
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...ct/Rector/Empty_/DisallowedEmptyRuleFixerRector/Fixture/skip_empty_from_param_doc.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,16 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
class SkipEmptyFromParamDoc | ||
{ | ||
/** | ||
* @param string $value | ||
*/ | ||
public function getLabel($value) | ||
{ | ||
if (empty($value)) { | ||
|
||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...or/Empty_/DisallowedEmptyRuleFixerRector/Fixture/skip_multi_union_types_from_docs.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,14 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
final class SkipMultiUnionTypesFromDoc | ||
{ | ||
/** | ||
* @param int|int[]|null|string $id | ||
*/ | ||
public function get($id) | ||
{ | ||
return empty($id); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...r/Empty_/DisallowedEmptyRuleFixerRector/Fixture/skip_negated_union_types_from_doc.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,14 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector\Fixture; | ||
|
||
final class SkipNegatedUnionTypeFromDoc | ||
{ | ||
/** | ||
* @param int|int[]|string $value | ||
*/ | ||
public function run($value) | ||
{ | ||
return ! empty($value); | ||
} | ||
} |
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