| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | abstract class BaseConvention |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Returns the namespace part of a class |
||
| 23 | * |
||
| 24 | * @param string $class |
||
| 25 | * |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | protected function getNamespace(string $class) |
||
| 29 | { |
||
| 30 | return $this->oneLevelUp($class); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Chops the last part of the namespace eg \a\b\c => \a\b |
||
| 35 | * |
||
| 36 | * @param string $namespace |
||
| 37 | * |
||
| 38 | * @return bool|string |
||
| 39 | */ |
||
| 40 | protected function oneLevelUp(string $namespace) |
||
| 47 | } |
||
| 48 | } |
||
| 49 |