-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Skip used defined in extract() on RemoveNonExistingVarAnno…
…tationRector (#4468) * [DeadCode] Skip used defined in extract() on RemoveNonExistingVarAnnotationRector * [DeadCode] Skip used defined in extract() on RemoveNonExistingVarAnnotationRector * [DeadCode] Skip used defined in extract() on RemoveNonExistingVarAnnotationRector
- Loading branch information
1 parent
3cc6365
commit 5b64258
Showing
2 changed files
with
130 additions
and
28 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.../Node/RemoveNonExistingVarAnnotationRector/Fixture/skip_used_after_next_statement.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,29 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector\Fixture; | ||
|
||
class SkipUsedAfterNextStatement | ||
{ | ||
public function get(): void | ||
{ | ||
$options = [ | ||
'a' => 'value a', | ||
'b' => 'value b', | ||
'c' => 'value c', | ||
]; | ||
|
||
extract($options); | ||
/** | ||
* @var string $a | ||
* @var string $b | ||
* @var string $c | ||
*/ | ||
$callback = function ($var1, $var2, $var3) { | ||
return $var1 . $var2 . $var3; | ||
}; | ||
|
||
$callback($a, $b, $c); | ||
} | ||
} | ||
|
||
?> |
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