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