| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 65 | 15 | protected function transformField($field, $type) |
|
| 66 | { |
||
| 67 | 15 | if ($type == 'camelize') { |
|
| 68 | return [ |
||
| 69 | 15 | 'field' => lcfirst(camelize($field)), |
|
| 70 | 15 | 'accessor' => lcfirst(camelize('get_' . $field)), |
|
| 71 | 15 | 'mutator' => lcfirst(camelize('set_' . $field)) |
|
| 72 | 10 | ]; |
|
| 73 | } |
||
| 74 | |||
| 75 | return [ |
||
| 76 | 15 | 'field' => lcfirst(underscore($field)), |
|
| 77 | 15 | 'accessor' => lcfirst(underscore('get_' . $field)), |
|
| 78 | 15 | 'mutator' => lcfirst(underscore('set_' . $field)) |
|
| 79 | 10 | ]; |
|
| 82 |