ViewsLoaderTrait::loadViewsFromShip()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Ship\Engine\Loaders;
4
5
use File;
6
7
/**
8
 * Class ViewsLoaderTrait.
9
 *
10
 * @author  Mahmoud Zalt <[email protected]>
11
 */
12
trait ViewsLoaderTrait
13
{
14
15
    /**
16
     * @param $containerName
17
     */
18
    public function loadViewsFromContainers($containerName)
19
    {
20
        $containerViewDirectory = base_path('app/Containers/' . $containerName . '/UI/WEB/Views/');
21
22
        $this->loadViews($containerViewDirectory, $containerName);
23
    }
24
25
    /**
26
     * @param void
27
     */
28
    public function loadViewsFromShip()
29
    {
30
        // ..
31
    }
32
33
    /**
34
     * @param $directory
35
     * @param $containerName
36
     */
37
    private function loadViews($directory, $containerName)
38
    {
39
        if (File::isDirectory($directory)) {
40
            $this->loadViewsFrom($directory, strtolower($containerName));
0 ignored issues
show
Bug introduced by
The method loadViewsFrom() does not exist on App\Ship\Engine\Loaders\ViewsLoaderTrait. Did you maybe mean loadViewsFromContainers()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
41
        }
42
    }
43
44
}
45