Passed
Push — master ( a1de92...1a465b )
by Robbie
03:52
created

ElementalAreaConfig::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
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
Unused Code introduced by Guy Marriott
The call to SilverStripe\Forms\GridF...tailForm::__construct() has too many arguments starting with false. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        $this->addComponent(/** @scrutinizer ignore-call */ new GridFieldDetailForm(null, false, false));

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.

Loading history...
24
25
        $this->extend('updateConfig');
26
    }
27
}
28