| Conditions | 5 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public static function getRawValue($val) { |
||
|
|
|||
| 18 | $return = $val; |
||
| 19 | if (method_exists($val, 'raw')) { |
||
| 20 | $return = $val->raw(); |
||
| 21 | } |
||
| 22 | elseif (is_array($val)) { |
||
| 23 | $return = array(); |
||
| 24 | foreach ($val as $v) { |
||
| 25 | $return[] = method_exists($v, 'raw') ? $v->raw() : $v; |
||
| 26 | } |
||
| 27 | } |
||
| 28 | return $return; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.