Issues (10)

tests/fixtures/Controllers/BaseController.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace ByTIC\Navigation\Tests\Fixtures\Controllers;
4
5
use ByTIC\Navigation\Breadcrumbs\Controllers\HasBreadcrumbsTrait;
6
use Nip\Controllers\Controller;
7
8
/**
9
 * Class BaseController
10
 * @package ByTIC\Navigation\Tests\Fixtures\Controllers
11
 */
12
class BaseController extends Controller
13
{
14
    use HasBreadcrumbsTrait;
0 ignored issues
show
The trait ByTIC\Navigation\Breadcr...ers\HasBreadcrumbsTrait requires the property $data which is not provided by ByTIC\Navigation\Tests\F...trollers\BaseController.
Loading history...
15
16
    public function index()
17
    {
18
        $this->setBreadcrumbs();
19
    }
20
21
    /**
22
     * @inheritdoc
23
     */
24
    protected function setBreadcrumbs()
25
    {
26
        $this->breadcrumbs()->addItem('test1', '#');
0 ignored issues
show
The method addItem() does not exist on ByTIC\Navigation\Breadcrumbs\Trail. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

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

26
        $this->breadcrumbs()->/** @scrutinizer ignore-call */ addItem('test1', '#');
Loading history...
27
    }
28
}
29