Total Complexity | 9 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | class ResultRow extends Result{ |
||
19 | |||
20 | /** |
||
21 | * @param string $name |
||
22 | * @param array $arguments |
||
23 | * |
||
24 | * @return mixed|null |
||
25 | */ |
||
26 | public function __call(string $name, array $arguments){ |
||
27 | $value = $this->array[$name] ?? null; |
||
28 | |||
29 | if($value !== null){ |
||
30 | $func = $arguments[0] ?? null; |
||
31 | |||
32 | if(is_callable($func)){ |
||
33 | return call_user_func_array($func, [$value]); |
||
|
|||
34 | } |
||
35 | |||
36 | } |
||
37 | |||
38 | return $value; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | public function __get(string $name){ |
||
45 | return $this->array[$name] ?? null; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | */ |
||
51 | public function __toArray():array{ |
||
52 | return $this->__EnumerableToArray(); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function offsetSet($offset, $value):void{ |
||
67 | |||
68 | } |
||
69 | |||
70 | } |
||
71 |