-
-
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.
[TypeDeclaration] Remove PhpDocTypeChanger->changeVarType() on TypedP…
…ropertyFromAssignsRector (#3163) Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
44c95d4
commit f35326d
Showing
10 changed files
with
87 additions
and
130 deletions.
There are no files selected for viewing
42 changes: 0 additions & 42 deletions
42
.../TypedPropertyFromAssignsRector/Fixture/anonymous_extends_existing_class_in_union.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
17 changes: 17 additions & 0 deletions
17
...dPropertyFromAssignsRector/Fixture/skip_anonymous_extends_existing_class_in_union.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
final class SkipAnonymousExtendsExistingClassInUnion | ||
{ | ||
private $x; | ||
|
||
public function __construct() | ||
{ | ||
if (rand(0,1)) { | ||
$this->x = new \DateTime('now'); | ||
} else { | ||
$this->x = new class extends \DateTime {}; | ||
} | ||
} | ||
} |
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
42 changes: 0 additions & 42 deletions
42
...ration/Rector/Property/TypedPropertyFromAssignsRector/FixtureComplexTypes/if_else.php.inc
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
.../TypedPropertyFromAssignsRector/FixtureComplexTypes/skip_union_protected_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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\FixtureComplexTypes; | ||
|
||
final class SkipUnionProtectedProperty | ||
{ | ||
protected $stringOrInteger = 'hi'; | ||
|
||
public function setNumber() | ||
{ | ||
if (mt_rand(0, 100)) { | ||
$this->stringOrInteger = 'hey'; | ||
} else { | ||
$this->stringOrInteger = 1000; | ||
} | ||
} | ||
} |
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
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