-
-
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.
[DeadCode] Skip RemoveAlwaysTrueIfConditionRector on property use by @…
…var docblock on Trait (#2729) * [DeadCode] Skip RemoveAlwaysTrueIfConditionRector on property use by @var docblock on Trait * Fixed 🎉
- Loading branch information
1 parent
3fba7c6
commit 61b6e86
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...r/If_/RemoveAlwaysTrueIfConditionRector/Fixture/skip_property_by_var_doc_in_trait.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,20 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector\Fixture; | ||
|
||
trait SkipPropertyByVarDocInTrait | ||
{ | ||
/** @var Formatter|null */ | ||
private $formatter; | ||
|
||
public function verify() | ||
{ | ||
// if we don't have a formatter, make one | ||
if (! isset($this->formatter)) { | ||
// if no formatter, use the default | ||
$this->formatter = new Formatter(); | ||
} | ||
|
||
$this->formatter->format(); | ||
} | ||
} |
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