-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Decouple AddParamTypeFromPropertyTypeRector (#3109)
Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
f862bf9
commit 0d8c296
Showing
19 changed files
with
373 additions
and
380 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
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
44 changes: 0 additions & 44 deletions
44
...s/TypeDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector/Fixture/edge_case.php.inc
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
...peDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector/Fixture/from_property.php.inc
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
...Declaration/Rector/ClassMethod/AddArrayParamDocTypeRector/Fixture/nullable_setter.php.inc
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...eclaration/Rector/ClassMethod/AddArrayParamDocTypeRector/Fixture/nullable_setter2.php.inc
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
...Declaration/Rector/ClassMethod/AddArrayParamDocTypeRector/Fixture/param_no_double.php.inc
This file was deleted.
Oops, something went wrong.
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
31 changes: 31 additions & 0 deletions
31
...Declaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Fixture/fixture.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\ClassMethod\AddParamTypeFromPropertyTypeRector\Fixture; | ||
|
||
final class SomeClass | ||
{ | ||
private int $number; | ||
|
||
public function setValue($number) | ||
{ | ||
$this->number = $number; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector\Fixture; | ||
|
||
final class SomeClass | ||
{ | ||
private int $number; | ||
|
||
public function setValue(int $number) | ||
{ | ||
$this->number = $number; | ||
} | ||
} | ||
|
||
?> |
37 changes: 37 additions & 0 deletions
37
...n/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Fixture/nullable_property.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector\Fixture; | ||
|
||
final class NullableProperty | ||
{ | ||
/** | ||
* @var int[]|null | ||
*/ | ||
public ?array $bar; | ||
|
||
public function setBar($bar): void | ||
{ | ||
$this->bar = $bar; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector\Fixture; | ||
|
||
final class NullableProperty | ||
{ | ||
/** | ||
* @var int[]|null | ||
*/ | ||
public ?array $bar; | ||
|
||
public function setBar(?array $bar): void | ||
{ | ||
$this->bar = $bar; | ||
} | ||
} | ||
|
||
?> |
Oops, something went wrong.