| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 1 | protected function normalizeDocument(QueryBuilder $queryBuilder) |
|
| 15 | { |
||
| 16 | 1 | if ($this->parameters['id'] === null) { |
|
| 17 | 1 | $this->parameters['id'] = $this->parameters['collection']; |
|
|
|
|||
| 18 | 1 | unset($this->parameters['collection']); |
|
| 19 | } |
||
| 20 | |||
| 21 | 1 | if (isset($this->parameters['collection'])) { |
|
| 22 | 1 | $this->parameters['collection'] = $queryBuilder->normalizeArgument( |
|
| 23 | 1 | $this->parameters['collection'], |
|
| 24 | 1 | ['Collection', 'Id', 'Query', 'Bind'] |
|
| 25 | ); |
||
| 26 | } |
||
| 27 | 1 | $this->parameters['id'] = $queryBuilder->normalizeArgument( |
|
| 28 | 1 | $this->parameters['id'], |
|
| 29 | 1 | ['Id', 'Key', 'Query', 'List', 'Bind'] |
|
| 30 | ); |
||
| 33 |