-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php81] Allow nullable union on NullToStrictStringFuncCallArgRector (#…
…5532) * [Php81] Allow union on NullToStrictStringFuncCallArgRector * [Php81] Allow union on NullToStrictStringFuncCallArgRector * [ci-review] Rector Rectify * [Php81] Allow union on NullToStrictStringFuncCallArgRector * fix --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
b78db9f
commit 27791d1
Showing
2 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...ector/FuncCall/NullToStrictStringFuncCallArgRector/Fixture/with_nullable_docblock.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,45 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
class WithNullableDocblock | ||
{ | ||
/** | ||
* @var string|null | ||
*/ | ||
public $importedId; | ||
|
||
/** | ||
* @param string|null $importedId | ||
*/ | ||
public function setImportedId($importedId) { | ||
if (strlen($this->importedId) > 0) { | ||
$this->importedId = $importedId; | ||
} | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector\Fixture; | ||
|
||
class WithNullableDocblock | ||
{ | ||
/** | ||
* @var string|null | ||
*/ | ||
public $importedId; | ||
|
||
/** | ||
* @param string|null $importedId | ||
*/ | ||
public function setImportedId($importedId) { | ||
if (strlen((string) $this->importedId) > 0) { | ||
$this->importedId = $importedId; | ||
} | ||
} | ||
} | ||
|
||
?> |
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