Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check
@no-named-arguments
in MethodSignatureRule
Add a check preventing a child method from declaring `@no-named-arguments` when parent method does not Co-authored-by: Ondrej Mirtes <ondrej@mirtes.cz>
- Loading branch information
1 parent
45d951a
commit 7e58d45
Showing
11 changed files
with
83 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
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 |
---|---|---|
|
@@ -16,4 +16,6 @@ | |
interface ExtendedMethodReflection extends MethodReflection | ||
{ | ||
|
||
public function acceptsNamedArguments(): bool; | ||
|
||
} |
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
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
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,26 @@ | ||
<?php | ||
|
||
namespace NoNamedArguments; | ||
|
||
class Baz extends Foo implements Bar | ||
{ | ||
/** | ||
* @no-named-arguments | ||
*/ | ||
public function namedArgumentsInParent(float ...$args) {} | ||
|
||
/** | ||
* @no-named-arguments | ||
*/ | ||
public function namedArgumentsInInterface(float ...$args) {} | ||
} | ||
|
||
abstract class Foo | ||
{ | ||
abstract public function namedArgumentsInParent(float ...$args); | ||
} | ||
|
||
interface Bar | ||
{ | ||
public function namedArgumentsInInterface(); | ||
} |