| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ControllerConfigParser |
||
| 6 | { |
||
| 7 | public static function parse($code) |
||
| 8 | { |
||
| 9 | $configCode = ScaffoldingParser::extract_unit($code, cbStartMarker('CONFIGURATION'), cbEndMarker('CONFIGURATION')); |
||
| 10 | $configCode = preg_replace('/[\t\n\r\0\x0B]/', '', $configCode); |
||
| 11 | $configCode = preg_replace('/([\s])\1+/', ' ', $configCode); |
||
| 12 | $configCode = explode(";", $configCode); |
||
| 13 | $configCode = array_map('trim', $configCode); |
||
| 14 | $result = self::toArray($code, $configCode); |
||
| 15 | |||
| 16 | return $result; |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param $code |
||
| 21 | * @param $configCode |
||
| 22 | * @return array |
||
| 23 | */ |
||
| 24 | private static function toArray($code, $configCode) |
||
| 45 | } |
||
| 46 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.