| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function getClassAsTitle($ex) |
||
| 18 | { |
||
| 19 | $refClass = new \ReflectionClass($ex); |
||
| 20 | |||
| 21 | $title = str_replace("Exception", "", $refClass->getShortName()); |
||
| 22 | $title = preg_replace("/([a-z0-9])([A-Z])/", "$1 $2", $title); |
||
| 23 | return preg_replace("/([a-z])(\d)/", "$1 $2", $title); |
||
| 24 | } |
||
| 26 | } |