-
-
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.
[Php71] Skip First Class Callable on RemoveExtraParametersRector (#2622)
* [Php71] Skip First Class Callable on RemoveExtraParametersRector * crash on Expression directly * Fixed 🎉
- Loading branch information
1 parent
dfc6e1d
commit 8eedf18
Showing
4 changed files
with
45 additions
and
0 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
20 changes: 20 additions & 0 deletions
20
...p71/Rector/FuncCall/RemoveExtraParametersRector/Fixture/skip_first_class_callable.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,20 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php71\Rector\FuncCall\RemoveExtraParametersRector\Fixture; | ||
|
||
final class SkipFirstClassCallable | ||
{ | ||
public function getFunctions(): array | ||
{ | ||
return [ | ||
new TwigFunction('app_seo_title', $this->getTitle(...), [ | ||
'is_safe' => ['html'], | ||
]), | ||
]; | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return 'title'; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...l/RemoveExtraParametersRector/Fixture/skip_first_class_callable_direct_expression.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,16 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php71\Rector\FuncCall\RemoveExtraParametersRector\Fixture; | ||
|
||
final class SkipFirstClassCallableDirectExpression | ||
{ | ||
public function getFunctions() | ||
{ | ||
$this->getTitle(...); | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return 'title'; | ||
} | ||
} |
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