GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

GridFieldEditOriginalPageConfigSecondHandPage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
/**
3
 * @author nicolaas <[email protected]>
4
 */
5
class GridFieldEditOriginalPageConfigSecondHandPage extends GridFieldConfig_RecordEditor
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...
6
{
7
    /**
8
     * @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...
9
     */
10
    public function __construct($itemsPerPage = null)
11
    {
12
        parent::__construct($itemsPerPage);
13
        $this
14
            ->removeComponentsByType('GridFieldDeleteAction')
15
            ->removeComponentsByType('GridFieldAddNewButton')
16
            ->removeComponentsByType('GridFieldAddNewButtonOriginalPage')
17
            ->addComponent(new GridFieldAddNewButtonOriginalPageSecondHandProduct());
18
    }
19
}
20