GridFieldBasicPageRelationConfigNoAddExisting   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
4
/**
5
 * @author nicolaas <[email protected]>
6
 */
7
class GridFieldBasicPageRelationConfigNoAddExisting extends GridFieldConfig_RelationEditor
8
{
9
    /**
10
     * @param int $itemsPerPage - How many items per page should show up
0 ignored issues
show
Documentation introduced by
Should the type for parameter $itemsPerPage not be integer|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
11
     */
12
    public function __construct($itemsPerPage = null)
13
    {
14
        parent::__construct($itemsPerPage);
15
        $this
16
            ->removeComponentsByType('GridFieldEditButton')
17
            ->removeComponentsByType('GridFieldAddNewButton')
18
            ->removeComponentsByType('GridFieldAddExistingAutocompleter')
19
            ->removeComponentsByType('GridFieldDeleteAction');
20
    }
21
}
22