Conditions | 3 |
Paths | 3 |
Total Lines | 24 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
58 | 3 | public function __soapCall( |
|
59 | $function_name, |
||
60 | $arguments, |
||
61 | $options = null, |
||
62 | $input_headers = null, |
||
63 | &$output_headers = null |
||
64 | ) { |
||
65 | 3 | $index = $this->currentIndex++; |
|
66 | |||
67 | 3 | $responses = $this->responses; |
|
68 | |||
69 | 3 | if (is_callable($responses)) { |
|
70 | 1 | return ($responses)(...func_get_args()); |
|
71 | } |
||
72 | |||
73 | 2 | $index %= count($responses); |
|
|
|||
74 | |||
75 | 2 | $response = $responses[$index]; |
|
76 | |||
77 | 2 | if ($response instanceof SoapFault) { |
|
78 | 1 | throw $response; |
|
79 | } |
||
80 | |||
81 | 1 | return $response; |
|
82 | } |
||
84 |