| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | 12 | protected function transformField($field, $type) |
|
| 44 | { |
||
| 45 | 12 | if ($type == 'camelize') { |
|
| 46 | return [ |
||
| 47 | 12 | 'field' => lcfirst(Inflector::camelize($field)), |
|
| 48 | 12 | 'accessor' => lcfirst(Inflector::camelize('set_' . $field)), |
|
| 49 | 12 | 'mutator' => lcfirst(Inflector::camelize('get_' . $field)) |
|
| 50 | 12 | ]; |
|
| 51 | } |
||
| 52 | |||
| 53 | return [ |
||
| 54 | 12 | 'field' => lcfirst(Inflector::underscore($field)), |
|
| 55 | 12 | 'accessor' => lcfirst(Inflector::underscore('set_' . $field)), |
|
| 56 | 12 | 'mutator' => lcfirst(Inflector::underscore('get_' . $field)) |
|
| 57 | 12 | ]; |
|
| 58 | } |
||
| 59 | } |
||
| 60 |