Passed
Branch master (e714e6)
by Gabriel
13:58 queued 11:36
created

HasHelpersTrait::addHelpersExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\View\Extensions\Helpers;
4
5
use Nip\View\Helpers\DoctypeHelper;
6
7
/**
8
 * Trait HasHelpersTrait
9
 * @package Nip\View\Traits
10
 *
11
 * @method hasHelper($name)
12
 * @method getHelper($name)
13
 *
14
 * @method DoctypeHelper Doctype()
15
 *
16
 * @method Helpers\View\Breadcrumbs Breadcrumbs()
17
 * @method Helpers\View\Flash Flash()
18
 * @method Helpers\View\FacebookMeta FacebookMeta()
19
 * @method Helpers\View\GoogleAnalytics GoogleAnalytics()
20
 * @method Helpers\View\HTML HTML()
21
 * @method Helpers\View\Messages Messages()
22
 * @method Helpers\View\Meta Meta()
23
 * @method Helpers\View\Paginator Paginator()
24
 * @method Helpers\View\Scripts Scripts()
25
 * @method Helpers\View\Stylesheets Stylesheets()
26
 * @method Helpers\View\TinyMCE TinyMCE()
27
 * @method Helpers\View\Url Url()
28
 * @method Helpers\View\GoogleDFP GoogleDFP()
29
 */
30
trait HasHelpersTrait
31
{
32 6
    public function addHelpersExtension()
33
    {
34 6
        $this->register(new HelpersExtension());
0 ignored issues
show
Bug introduced by
It seems like register() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

34
        $this->/** @scrutinizer ignore-call */ 
35
               register(new HelpersExtension());
Loading history...
35 6
    }
36
}
37