| Conditions | 4 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 12 | public function setParameter($key, $value, $type = null): self |
||
| 13 | { |
||
| 14 | if ($value instanceof EntityInterface) { |
||
| 15 | $value = $value->getId(); |
||
| 16 | } |
||
| 17 | if ($value instanceof UuidInterface) { |
||
| 18 | if (null === $type) { |
||
| 19 | $type = MappingHelper::TYPE_UUID; |
||
| 20 | } |
||
| 21 | $value = $value->toString(); |
||
| 22 | } |
||
| 23 | |||
| 24 | parent::setParameter($key, $value, $type); |
||
| 25 | |||
| 26 | return $this; |
||
| 27 | } |
||
| 29 |