Completed
Push — master ( 5a0778...47755c )
by Nicolaas
03:23
created

__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
/**
5
 * @author nicolaas <[email protected]>
6
 */
7
class GridFieldEditOriginalPageConfigWithAddExisting extends GridFieldConfig_RelationEditor
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
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
            ->addComponent(new GridFieldEditButtonOriginalPage());
19
    }
20
}
21