These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | |||
4 | /** |
||
5 | * @author nicolaas <[email protected]> |
||
6 | */ |
||
7 | class GridFieldEditOriginalPageConfigWithAddExisting extends GridFieldConfig_RelationEditor |
||
0 ignored issues
–
show
|
|||
8 | { |
||
9 | /** |
||
10 | * @param int $itemsPerPage - How many items per page should show up |
||
0 ignored issues
–
show
Should the type for parameter
$itemsPerPage not be integer|null ?
This check looks for 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 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.