| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | trait Utils |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @param $string |
||
| 20 | * @param string $separator |
||
| 21 | * @return string |
||
| 22 | * This method converts a string into camelCase |
||
| 23 | * The main constraint: the properties of a class using this trait must be compliant with the following pattern |
||
| 24 | * (^[a-z]|[A-Z0-9])[a-z]* |
||
| 25 | */ |
||
| 26 | public function camelize($string, $separator = '_') |
||
| 36 | ) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param $string |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function unCamelize($string) |
||
| 49 |