| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function transformValue($value) |
||
| 36 | { |
||
| 37 | $namespace = 'field_'; |
||
| 38 | $groupName = $this->getBuilder()->getName(); |
||
| 39 | |||
| 40 | if ($groupName) { |
||
| 41 | // remove field_ or group_ if already at the begining of the key |
||
| 42 | $value = preg_replace('/^field_|^group_/', '', $value); |
||
| 43 | $namespace .= str_replace(' ', '_', $groupName).'_'; |
||
| 44 | } |
||
| 45 | return strtolower($namespace.$value); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: