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