-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Handle multiple methods define __construct later on…
… TypedPropertyFromStrictConstructorRector (#2009)
- Loading branch information
1 parent
85ff416
commit e470787
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...TypedPropertyFromStrictConstructorRector/Fixture/multi_methods_with_default_value.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,44 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector\Fixture; | ||
|
||
final class MultiMethodsWithDefaultValue | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $rootView = 'admin.index'; | ||
|
||
public function run() | ||
{ | ||
$this->rootView = 'super_admin.index'; | ||
} | ||
|
||
public function __construct() | ||
{ | ||
$this->rootView = 'super_admin.index'; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector\Fixture; | ||
|
||
final class MultiMethodsWithDefaultValue | ||
{ | ||
private string $rootView; | ||
|
||
public function run() | ||
{ | ||
$this->rootView = 'super_admin.index'; | ||
} | ||
|
||
public function __construct() | ||
{ | ||
$this->rootView = 'super_admin.index'; | ||
} | ||
} | ||
|
||
?> |
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