Conditions | 4 |
Paths | 5 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function getName(): string { |
||
20 | 1 | $reflection = new \ReflectionClass($this); |
|
21 | 1 | if($reflection->hasProperty("name")) { |
|
22 | 1 | if(isset($this->name)) { |
|
23 | 1 | return $this->name; |
|
24 | } |
||
25 | } |
||
26 | 1 | $class = (string) Strings::after(static::class, "\\", -1); |
|
27 | 1 | if(str_starts_with($class, "LinkRender")) { |
|
28 | 1 | $class = (string) Strings::after($class, "LinkRender"); |
|
29 | } |
||
30 | 1 | return Strings::lower($class); |
|
31 | } |
||
33 | ?> |