Completed
Push — master ( ecaba6...f0c386 )
by Roman
13s
created

src/Page/ProductController.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace SilverShop\Page;
4
5
use PageController;
6
use SilverShop\Forms\AddProductForm;
7
8
class ProductController extends PageController
9
{
10
    private static $allowed_actions = [
11
        'Form',
12
        'AddProductForm',
13
    ];
14
15
    public function Form()
16
    {
17
        $form = AddProductForm::create($this, 'Form');
0 ignored issues
show
'Form' of type string is incompatible with the type array expected by parameter $args of SilverStripe\View\ViewableData::create(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

17
        $form = AddProductForm::create($this, /** @scrutinizer ignore-type */ 'Form');
Loading history...
$this of type SilverShop\Page\ProductController is incompatible with the type array expected by parameter $args of SilverStripe\View\ViewableData::create(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

17
        $form = AddProductForm::create(/** @scrutinizer ignore-type */ $this, 'Form');
Loading history...
18
        $this->extend('updateForm', $form);
19
        return $form;
20
    }
21
}
22