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

HasHelpersTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A addHelpersExtension() 0 3 1
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