private function includeParameter(ParameterDefinition $parameterDefinition, array $groups): bool
    {
        $parameterGroups = $parameterDefinition->getGroups();

        if (count($parameterGroups) === 0 || count($groups) === 0) {
            return true;
        }

        return count(array_intersect($parameterGroups, $groups)) > 0;
    }