| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | trait NormalizesMiscellaneousFunctions |
||
| 15 | { |
||
| 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 | ); |
||
| 33 | 1 | } |
|
| 34 | |||
| 35 | 1 | protected function normalizeFirstDocument(QueryBuilder $queryBuilder): void |
|
| 38 | 1 | } |
|
| 39 | } |
||
| 40 |