Passed
Push — master ( 8bc21d...dfc3d9 )
by Gabriel
04:06
created

ViewHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 1
b 0
f 1
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerAdminPaths() 0 5 1
A registerFrontendPaths() 0 4 1
1
<?php
2
3
namespace ByTIC\Hello\Utility;
4
5
use ByTIC\Hello\Library\View\Traits\HasHelloAdminFolderTrait;
6
use ByTIC\Hello\Library\View\Traits\HasHelloFrontendFolderTrait;
7
use Nip\View\View;
8
9
/**
10
 * Class ViewHelper
11
 * @package ByTIC\Hello\Utility
12
 */
13
class ViewHelper
14
{
15
    /**
16
     * @param View|HasHelloFrontendFolderTrait $view
17
     */
18
    public static function registerFrontendPaths(View $view)
19
    {
20
        $view->addPath(PathHelper::views('/Frontend'), 'Hello');
21
        $view->addPath(PathHelper::views('/Frontend'), 'HelloFrontend');
22
    }
23
24
    /**
25
     * @param View|HasHelloAdminFolderTrait $view
26
     */
27
    public static function registerAdminPaths(View $view)
28
    {
29
        $view->addPath(PathHelper::views('/Admin'));
30
        $view->addPath(PathHelper::views('/Admin'), 'Hello');
31
        $view->addPath(PathHelper::views('/Admin'), 'HelloAdmin');
32
    }
33
}