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