| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function denormalize($data, $class, $format = null, array $context = []) |
||
| 22 | { |
||
| 23 | try { |
||
| 24 | $suffix = $this->rules->getPublicSuffix('test.' . ltrim($data, '.'), Rules::ICANN_DOMAINS); |
||
| 25 | if (!$suffix->isKnown()) { |
||
| 26 | throw new InvalidValueForValueObjectException($data, PublicSuffix::class); |
||
| 27 | } |
||
| 28 | } catch (CouldNotResolvePublicSuffix $e) { |
||
| 29 | throw new InvalidValueForValueObjectException($data, PublicSuffix::class); |
||
| 30 | } |
||
| 31 | return $suffix; |
||
| 32 | } |
||
| 50 |