BaseController::setBreadcrumbs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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
Bug introduced by
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
Bug introduced by
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