| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.3332 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 49 | 2 | protected function generateType() |
|
| 50 | { |
||
| 51 | 2 | if ($this->getClassName() == Route::class) { |
|
|
|
|||
| 52 | 1 | return 'literal'; |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | if ($this->isNamespaced()) { |
|
| 56 | 1 | $name = strtolower($this->getClassFirstName()); |
|
| 57 | 1 | return str_replace('route', '', $name); |
|
| 58 | } |
||
| 59 | $name = get_class($this); |
||
| 60 | $parts = explode('_', $name); |
||
| 61 | |||
| 62 | return strtolower(end($parts)); |
||
| 63 | } |
||
| 65 |