Conditions | 2 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
27 | public function execute(Request $request) : ArtifactCollection |
||
28 | { |
||
29 | $entity = $this->getArtifact('entity'); |
||
30 | |||
31 | try { |
||
32 | $this->manager->remove($entity); |
||
33 | $this->manager->flush(); |
||
34 | } catch (\Exception $exception) { |
||
35 | throw new BadRequestHttpException('Your request can not be processed', $exception); |
||
36 | } |
||
37 | |||
38 | return new ArtifactCollection([ |
||
39 | new Artifact('data', null), |
||
40 | new Artifact('status', 204) |
||
41 | ]); |
||
49 | } |