ThemeViewFinder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setBasePath() 0 6 1
A removeBasePath() 0 4 1
1
<?php
2
3
namespace Yajra\CMS\Themes;
4
5
use Illuminate\View\FileViewFinder;
6
7
class ThemeViewFinder extends FileViewFinder
8
{
9
    /**
10
     * Base path to look for blade files.
11
     *
12
     * @var string
13
     */
14
    protected $basePath;
15
16
    /**
17
     * Set file view finder base path.
18
     *
19
     * @param $path
20
     */
21
    public function setBasePath($path)
22
    {
23
        $this->basePath = $path;
24
25
        array_unshift($this->paths, $this->basePath);
26
    }
27
28
    /**
29
     * Remove base path.
30
     */
31
    public function removeBasePath()
32
    {
33
        unset($this->paths[0]);
34
    }
35
}
36
37
38
39
40