AbstractViewCompiler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A replaceBreadcrumb() 0 7 1
1
<?php
2
3
namespace Scaffolder\Compilers;
4
5
abstract class AbstractViewCompiler extends AbstractCompiler
6
{
7
    /**
8
     * Replace the breadcrumb.
9
     *
10
     * @param $modelName
11
     *
12
     * @return $this
13
     */
14
    protected function replaceBreadcrumb($modelName)
15
    {
16
        $this->stub = str_replace('{{breadcrumb}}', ucfirst($modelName), $this->stub);
17
        $this->stub = str_replace('{{breadcrumb_lw}}', strtolower($modelName), $this->stub);
18
19
        return $this;
20
    }
21
}