| Conditions | 5 |
| Paths | 16 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 9 | parent::prepareRequest(); |
|
| 33 | |||
| 34 | 9 | $params = $this->params; |
|
| 35 | |||
| 36 | 9 | if (count($params)) { |
|
| 37 | 2 | $primaryKeys = $this->crud->getPrimaryKey(); |
|
| 38 | 2 | $primaryValues = explode('-', array_shift($params)); |
|
| 39 | |||
| 40 | 2 | $this->primary = array_combine($primaryKeys, $primaryValues); |
|
| 41 | } |
||
| 42 | 9 | if (count($params)) { |
|
| 43 | 1 | $this->relation = array_shift($params); |
|
| 44 | } |
||
| 45 | 9 | if (count($params)) { |
|
| 46 | 1 | $this->relationId = array_shift($params); |
|
| 47 | } |
||
| 48 | |||
| 49 | // OPTIONS |
||
| 50 | 9 | if (RequestMethod::OPTIONS === $this->method) { |
|
| 51 | $this->data = array_keys($this->map); |
||
| 52 | } |
||
| 53 | 9 | } |
|
| 54 | |||
| 71 |