Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
20 | 20 | public function __invoke(Method $method, Readable $arguments): StreamInterface |
|
21 | { |
||
22 | switch (true) { |
||
23 | 20 | case Methods::get('tx.select-ok')->equals($method): |
|
24 | 10 | $chunk = $this->selectOk(); |
|
25 | 10 | break; |
|
26 | |||
27 | 14 | case Methods::get('tx.commit-ok')->equals($method): |
|
28 | 6 | $chunk = $this->commitOk(); |
|
29 | 6 | break; |
|
30 | |||
31 | 8 | case Methods::get('tx.rollback-ok')->equals($method): |
|
32 | 6 | $chunk = $this->rollbackOk(); |
|
33 | 6 | break; |
|
34 | |||
35 | default: |
||
36 | 2 | throw new UnknownMethod($method); |
|
37 | } |
||
38 | |||
39 | 18 | return $chunk($arguments); |
|
40 | } |
||
57 |