private function doEvaluate(APILimitationValue $value, array $targets): bool
    {
        foreach ($targets as $target) {
            if (!$target instanceof Section && !$target instanceof SPISection) {
                throw new InvalidArgumentException('$targets', 'Must contain objects of type: Section');
            }

            if (!in_array($target->id, $value->limitationValues)) {
                return false;
            }
        }

        return true;
    }
private function doEvaluate(APILimitationValue $value, array $targets): bool
    {
        foreach ($targets as $target) {
            if (!$target instanceof Section && !$target instanceof SPISection) {
                throw new InvalidArgumentException('$targets', 'Must contain objects of type: Section');
            }

            if (!in_array($target->id, $value->limitationValues)) {
                return false;
            }
        }

        return true;
    }
private function doEvaluate ( APILimitationValue $ value , array $ targets ) : bool { foreach ( $ targets as $ target ) { if ( ! $ target instanceof Section && ! $ target instanceof SPISection ) { throw new InvalidArgumentException ( '$targets' , 'Must contain objects of type: Section' ) ; } if ( ! in_array ( $ target -> id , $ value -> limitationValues ) ) { return false ; } } return true ; }
Returns true if given limitation value allows all given sections.

@param \eZ\Publish\API\Repository\Values\User\Limitation $value
@param array|null $targets

@return bool

@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException
Returns true if given limitation value allows all given sections .