Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2.003 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 8 | #[\Override] |
|
26 | 8 | public function command(MethodInvocation $invocation, ResourceObject $ro) |
|
27 | { |
||
28 | unset($invocation); |
||
29 | 8 | $getQuery = $this->getQuery($ro); |
|
30 | 8 | $delUri = clone $ro->uri; |
|
31 | 7 | $delUri->query = $getQuery; |
|
32 | 7 | ||
33 | // delete data in repository |
||
34 | $this->repository->purge($delUri); |
||
35 | 7 | ||
36 | // GET for re-generate (in interceptor) |
||
37 | $ro->uri->query = $getQuery; |
||
38 | 7 | $get = [$ro, 'onGet']; |
|
39 | 7 | if (is_callable($get)) { |
|
40 | 7 | call_user_func_array($get, array_values($getQuery)); |
|
41 | } |
||
54 |