Checks whether a method/function call has too many arguments.
1 | <?php |
||
2 | |||
3 | namespace DNADesign\Elemental\Forms; |
||
4 | |||
5 | use SilverStripe\Forms\GridField\GridFieldConfig; |
||
6 | use SilverStripe\Forms\GridField\GridFieldButtonRow; |
||
7 | use SilverStripe\Forms\GridField\GridFieldToolbarHeader; |
||
8 | use SilverStripe\Forms\GridField\GridFieldFilterHeader; |
||
9 | use SilverStripe\Forms\GridField\GridFieldDataColumns; |
||
10 | use SilverStripe\Forms\GridField\GridFieldEditButton; |
||
11 | use SilverStripe\Forms\GridField\GridFieldDeleteAction; |
||
12 | use SilverStripe\Forms\GridField\GridFieldDetailForm; |
||
13 | use SilverStripe\Versioned\VersionedGridFieldState\VersionedGridFieldState; |
||
14 | use Symbiote\GridFieldExtensions\GridFieldOrderableRows; |
||
15 | |||
16 | class ElementalAreaConfig extends GridFieldConfig |
||
17 | { |
||
18 | public function __construct() |
||
19 | { |
||
20 | parent::__construct(); |
||
21 | |||
22 | $this->addComponent(new GridFieldDeleteAction(false)); |
||
23 | $this->addComponent(new GridFieldDetailForm(null, false, false)); |
||
0 ignored issues
–
show
|
|||
24 | |||
25 | $this->extend('updateConfig'); |
||
26 | } |
||
27 | } |
||
28 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.