-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php74] Skip array var type filled default null in __construct on Typ…
…edPropertyRector (#2029) Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
4fb405e
commit 4b351a7
Showing
5 changed files
with
117 additions
and
3 deletions.
There are no files selected for viewing
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
16 changes: 16 additions & 0 deletions
16
...4/Rector/Property/TypedPropertyRector/Fixture/skip_array_type_filled_default_null.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\Php74\Rector\Property\TypedPropertyRector\Fixture; | ||
|
||
final class SkipArrayTypeFilledDefaultNull | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $property; | ||
|
||
public function __construct(array $property = null) | ||
{ | ||
$this->property = $property; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...or/Property/TypedPropertyFromAssignsRector/Fixture/array_type_filled_default_null.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,34 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
final class ArrayTypeFilledDefaultNull | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $property; | ||
|
||
public function __construct(array $property = null) | ||
{ | ||
$this->property = $property; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
final class ArrayTypeFilledDefaultNull | ||
{ | ||
private ?array $property = null; | ||
|
||
public function __construct(array $property = null) | ||
{ | ||
$this->property = $property; | ||
} | ||
} | ||
|
||
?> |
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