| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function __call($method, $arguments) |
||
| 26 | { |
||
| 27 | $value = call_user_func_array([$this->innerController, $method], $arguments); |
||
| 28 | |||
| 29 | if ($value instanceof CachedValue) { |
||
| 30 | @trigger_error( |
||
|
|
|||
| 31 | 'Returning CachedValue objects from REST controllers is deprecated', |
||
| 32 | E_USER_DEPRECATED |
||
| 33 | ); |
||
| 34 | return $value->value; |
||
| 35 | } else { |
||
| 36 | return $value; |
||
| 37 | } |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
If you suppress an error, we recommend checking for the error condition explicitly: