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 |
||
16 | 1 | protected function normalizeDocument(QueryBuilder $queryBuilder): void |
|
17 | { |
||
18 | 1 | if ($this->parameters['id'] === null) { |
|
19 | 1 | $this->parameters['id'] = $this->parameters['collection']; |
|
|
|||
20 | 1 | unset($this->parameters['collection']); |
|
21 | } |
||
22 | |||
23 | 1 | if (isset($this->parameters['collection'])) { |
|
24 | 1 | $this->parameters['collection'] = $queryBuilder->normalizeArgument( |
|
25 | 1 | $this->parameters['collection'], |
|
26 | 1 | ['Collection', 'Id', 'Query', 'Bind'] |
|
27 | ); |
||
28 | } |
||
29 | 1 | $this->parameters['id'] = $queryBuilder->normalizeArgument( |
|
30 | 1 | $this->parameters['id'], |
|
31 | 1 | ['Id', 'Key', 'Query', 'List', 'Bind'] |
|
32 | ); |
||
40 |