Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0312 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 5 | public function fetch() |
|
41 | { |
||
42 | 5 | if ($this->cached && isset($this->value)) { |
|
43 | return $this->value; |
||
44 | } |
||
45 | 5 | $args = $this->context; |
|
46 | // useで引数を指定した場合、call_user_func_arrayの$argsと |
||
47 | // 引数の数が合わなくなり警告が出るが問題なく実行出来る |
||
48 | 5 | $result = @call_user_func_array($this->callback, $args); |
|
49 | 5 | if ($this->cached) { |
|
50 | 4 | $this->value = $result; |
|
51 | } |
||
52 | |||
53 | 5 | return $result; |
|
54 | } |
||
56 |