-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] More tests for native type with sub namespace and a…
…liased on TypedPropertyFromAssignsRector (#6496)
- Loading branch information
1 parent
fead5bd
commit 23f8e4a
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...tion/Rector/Property/TypedPropertyFromAssignsRector/Fixture/assign_object_aliased.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,35 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
use PhpParser\Node as PHPParser; | ||
|
||
final class AssignObjectAliased | ||
{ | ||
private $int; | ||
|
||
public function __construct() | ||
{ | ||
$this->int = new PHPParser\Scalar\Int_(1); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
use PhpParser\Node as PHPParser; | ||
|
||
final class AssignObjectAliased | ||
{ | ||
private \PhpParser\Node\Scalar\Int_ $int; | ||
|
||
public function __construct() | ||
{ | ||
$this->int = new PHPParser\Scalar\Int_(1); | ||
} | ||
} | ||
|
||
?> |
35 changes: 35 additions & 0 deletions
35
...Rector/Property/TypedPropertyFromAssignsRector/Fixture/assign_object_subnamespace.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,35 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
use PhpParser\Node; | ||
|
||
final class AssignObjectSubnamespace | ||
{ | ||
private $int; | ||
|
||
public function __construct() | ||
{ | ||
$this->int = new Node\Scalar\Int_(1); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector\Fixture; | ||
|
||
use PhpParser\Node; | ||
|
||
final class AssignObjectSubnamespace | ||
{ | ||
private \PhpParser\Node\Scalar\Int_ $int; | ||
|
||
public function __construct() | ||
{ | ||
$this->int = new Node\Scalar\Int_(1); | ||
} | ||
} | ||
|
||
?> |