Conditions | 5 |
Paths | 16 |
Total Lines | 23 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5.0113 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 9 | protected function prepareRequest(): void |
|
25 | { |
||
26 | 9 | parent::prepareRequest(); |
|
27 | |||
28 | 9 | $params = $this->params; |
|
29 | |||
30 | 9 | if (count($params)) { |
|
31 | 2 | $primaryKeys = $this->crud->getPrimaryKey(); |
|
32 | |||
33 | 2 | $primaryValues = explode('-', array_shift($params), count($primaryKeys)); |
|
34 | |||
35 | 2 | $this->primary = array_combine($primaryKeys, $primaryValues); |
|
36 | } |
||
37 | 9 | if (count($params)) { |
|
38 | 1 | $this->relation = array_shift($params); |
|
39 | } |
||
40 | 9 | if (count($params)) { |
|
41 | 1 | $this->relationId = array_shift($params); |
|
42 | } |
||
43 | |||
44 | // OPTIONS |
||
45 | 9 | if (RequestMethod::OPTIONS === $this->method) { |
|
46 | $this->data = array_keys($this->map); |
||
47 | } |
||
61 |