Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 23 | public function name(): string |
|
24 | { |
||
25 | 23 | if($this->name) { |
|
26 | 16 | return $this->name; |
|
27 | } |
||
28 | |||
29 | 18 | $className = class_basename(static::class); |
|
30 | 18 | if($className !== 'Layout' && Str::endsWith($className, 'Layout')) { |
|
31 | 16 | $className = Str::beforeLast($className, 'Layout'); |
|
32 | } |
||
33 | |||
34 | 18 | return Str::snake($className); |
|
35 | } |
||
49 |