| Conditions | 5 |
| Paths | 5 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | private function transformUuidsToBytes(QueryBuilder $qb, array $parameters): void |
||
| 26 | { |
||
| 27 | $parameters = array_merge(['id'], $parameters); |
||
| 28 | |||
| 29 | foreach ($qb->getParameters() as $key => $value) { |
||
| 30 | if (empty($value) || !in_array($key, $parameters)) { |
||
| 31 | continue; |
||
| 32 | } |
||
| 33 | |||
| 34 | try { |
||
| 35 | $value = Uuid::fromString($value)->getBytes(); |
||
| 36 | $qb->setParameter($key, $value); |
||
| 37 | } catch (InvalidUuidStringException $e) { |
||
| 38 | // just skip it |
||
| 43 |