Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.3149 |
Changes | 0 |
1 | <?php |
||
28 | 1 | public function performAction() |
|
29 | { |
||
30 | 1 | $jsonData = $this->readData($this->path); |
|
31 | try { |
||
32 | 1 | $this->out = JsonPointer::getByPointer($jsonData, $this->pointer); |
|
33 | } catch (Exception $e) { |
||
34 | $this->response->error($e->getMessage()); |
||
35 | die(1); |
||
|
|||
36 | } |
||
37 | 1 | $this->postPerform(); |
|
38 | 1 | } |
|
40 | } |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.