| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 20 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 35 | public function isCompliant(NormalizerContextInterface $context, $object): bool | ||
| 36 |     { | ||
| 37 |         if ([] === $this->groups) { | ||
| 38 | return true; | ||
| 39 | } | ||
| 40 | |||
| 41 | $groups = $context->getAttribute(self::ATTRIBUTE_GROUPS, []); | ||
| 42 | |||
| 43 |         foreach ($this->groups as $group) { | ||
| 44 |             if (in_array($group, $groups, true)) { | ||
| 45 | return true; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | return false; | ||
| 50 | } | ||
| 51 | } | ||
| 52 |