| Conditions | 6 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function normalizeValue($value, ElementInterface $element = null) |
||
| 52 | { |
||
| 53 | |||
| 54 | if (is_string($value) || is_numeric($value)) { |
||
| 55 | return $value; |
||
| 56 | } |
||
| 57 | |||
| 58 | if (is_null($value) && $element !== null && !empty($element->getId())) { |
||
| 59 | return $this->findObjectId($element); |
||
| 60 | } |
||
| 61 | |||
| 62 | return $value; |
||
| 63 | } |
||
| 64 | |||
| 91 |