| 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 | $params = $this->params; |
|
| 33 | |||
| 34 | 9 | if (count($params)) { |
|
| 35 | 2 | $primaryKeys = $this->crud->getPrimaryKey(); |
|
| 36 | 2 | $primaryValues = explode('-', array_shift($params)); |
|
| 37 | |||
| 38 | 2 | $this->primary = array_combine($primaryKeys, $primaryValues); |
|
| 39 | } |
||
| 40 | 9 | if (count($params)) { |
|
| 41 | 1 | $this->relation = array_shift($params); |
|
| 42 | } |
||
| 43 | 9 | if (count($params)) { |
|
| 44 | 1 | $this->relationId = array_shift($params); |
|
| 45 | } |
||
| 46 | |||
| 47 | // OPTIONS |
||
| 48 | 9 | if (RequestMethod::OPTIONS === $this->method) { |
|
| 49 | $this->data = array_keys($this->map); |
||
| 50 | } |
||
| 51 | 9 | } |
|
| 52 | |||
| 53 | /** |
||
| 54 | * Prepare params |
||
| 69 |