AbstractViewCompiler::replaceBreadcrumb()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 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
}