Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
25 | 166 | public function call(string $funcName, ...$args) |
|
26 | { |
||
27 | 166 | $result = $this->tarantool->call($funcName, $args); |
|
28 | |||
29 | /* |
||
30 | * The $result can be one of the following: |
||
31 | * 1. An array of tuples, [[id, state, data], ...] |
||
32 | * 2. A scalar value, [[value]] |
||
33 | * 3. An empty array, [] |
||
34 | */ |
||
35 | |||
36 | 146 | return isset($result[0][1]) ? $result : ($result[0] ?? $result); |
|
37 | } |
||
39 |