Factory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 20
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A normalizeName() 0 10 2
1
<?php
2
3
namespace Schnoop\RemoteTemplate\View;
4
5
use Illuminate\Support\Str;
6
7
/**
8
 * Class Factory.
9
 */
10
class Factory extends \Illuminate\View\Factory
11
{
12
    /**
13
     * Normalize a view name.
14
     *
15
     * @param string $name
16
     *
17
     * @return string
18
     */
19
    protected function normalizeName($name): string
20
    {
21
        $delimiter = $this->container->get('config')->get('remote-view.remote-delimiter');
22
23
        if (Str::startsWith($name, $delimiter) === false) {
24
            return parent::normalizeName($name);
25
        }
26
27
        return $name;
28
    }
29
}
30