Completed
Push — master ( 3b65eb...dc665d )
by Nicolaas
11:00 queued 02:51
created

GridFieldEditOriginalPageConfigWithAddExisting.php (2 issues)

Upgrade to new PHP Analysis Engine

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
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
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