-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypedPropertyFromAssignsRector] Handle parse_url() native function w…
…ith second arg on TypedPropertyFromAssignsRector (#6562) * [TypedPropertyFromAssignsRector] Handle parse_url() native function with second arg on TypedPropertyFromAssignsRector * update fixture * Fix type constant * Fix type constant * fix * fix * typo fix * rollback tweak to find another solution * fix * fix
- Loading branch information
1 parent
1c9f232
commit 4579273
Showing
4 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...erty/TypedPropertyFromAssignsRector/FixtureComplexTypes/parse_url_with_second_arg.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,31 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\FixtureComplexTypes; | ||
|
||
final class ParseUrlWithSecondArg | ||
{ | ||
private $host = null; | ||
|
||
public function __construct(string $url) | ||
{ | ||
$this->host = parse_url($url, \PHP_URL_HOST); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\FixtureComplexTypes; | ||
|
||
final class ParseUrlWithSecondArg | ||
{ | ||
private string|false|null $host = null; | ||
|
||
public function __construct(string $url) | ||
{ | ||
$this->host = parse_url($url, \PHP_URL_HOST); | ||
} | ||
} | ||
|
||
?> |
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
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