-
-
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.
[Php81] Allow normal variable in trait on NullToStrictStringFuncCallA…
…rgRector (#3181) * [Php81] Allow normal variable in trait on NullToStrictStringFuncCallArgRector * update fixture * Fixed 🎉 * cs clean * phpstan * rename fixture for skip method call mixed object on trait -a * rollback property assigned in trait construct * rollback * clean up * [ci-review] Rector Rectify Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
e1f7637
commit e479114
Showing
5 changed files
with
70 additions
and
65 deletions.
There are no files selected for viewing
39 changes: 0 additions & 39 deletions
39
.../Property/AddFalseDefaultToBoolPropertyRector/Fixture/assigned_in_construct_trait.php.inc
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
.../Property/AddFalseDefaultToBoolPropertyRector/Fixture/skip_assigned_in_construct2.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\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector\Fixture; | ||
|
||
trait SkipAssignInConstruct2 | ||
{ | ||
/** | ||
* @var bool | ||
*/ | ||
private $property; | ||
|
||
public function __construct(bool $property) | ||
{ | ||
$this->property = $property; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...tor/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/normal_variable_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,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
trait NormalVariableInTrait | ||
{ | ||
public function getTitle($title) | ||
{ | ||
return trim($title); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
trait NormalVariableInTrait | ||
{ | ||
public function getTitle($title) | ||
{ | ||
return trim((string) $title); | ||
} | ||
} | ||
|
||
?> |
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