| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 40 | public function isCompliant(NormalizerContextInterface $context, $object): bool | ||
| 41 |     { | ||
| 42 |         if ([] === $this->groups) { | ||
| 43 | return true; | ||
| 44 | } | ||
| 45 | |||
| 46 | $contextGroups = $context->getAttribute(self::ATTRIBUTE_GROUPS, [self::GROUP_DEFAULT]); | ||
| 47 | |||
| 48 |         foreach ($this->groups as $group) { | ||
| 49 |             if (in_array($group, $contextGroups, true)) { | ||
| 50 | return true; | ||
| 51 | } | ||
| 52 | } | ||
| 53 | |||
| 54 | return false; | ||
| 55 | } | ||
| 56 | } | ||
| 57 |