Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1.0029 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 60 | public function getTemplate() |
|
20 | { |
||
21 | 60 | $reflectionClassName = new \ReflectionClass(get_class($this)); |
|
22 | 60 | $pattern = '/([a-z])([A-Z])/'; |
|
23 | 60 | $name = strtolower(preg_replace_callback($pattern, function ($a) { |
|
24 | return $a[1] . '-' . strtolower($a[2]); |
||
25 | 60 | }, $reflectionClassName->getShortName())); |
|
26 | |||
27 | 60 | return 'tab' . DIRECTORY_SEPARATOR . $name . '.html.twig'; |
|
28 | } |
||
29 | |||
38 |