-
-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php80] Handle param with default value on AddParamBasedOnParentClass…
…MethodRector (#1452) * Add source with default value * Add fixture for default value * Rename fixture * Fixes #1450 Co-authored-by: Ole Schäfer <ole@customgento.com>
- Loading branch information
1 parent
b4fabbd
commit 8d6eb87
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...Method/AddParamBasedOnParentClassMethodRector/Fixture/include_default_param_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,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector\Source\ParentWithParamWithDefaultValue; | ||
|
||
class IncludeDefaultParamValue extends ParentWithParamWithDefaultValue{ | ||
public function execute() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector\Source\ParentWithParamWithDefaultValue; | ||
|
||
class IncludeDefaultParamValue extends ParentWithParamWithDefaultValue{ | ||
public function execute($foo = true) | ||
{ | ||
} | ||
} | ||
|
||
?> |
10 changes: 10 additions & 0 deletions
10
...sMethod/AddParamBasedOnParentClassMethodRector/Source/ParentWithParamWithDefaultValue.php
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,10 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector\Source; | ||
|
||
class ParentWithParamWithDefaultValue | ||
{ | ||
public function execute($foo = true) | ||
{ | ||
} | ||
} |
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