Validator/Constraints/SharingValidator.php
private function validatePermissions(
        Sharing $constraint,
        SharingIdentityConfigInterface $config,
        Collection $permissions
    ): void {
        if ($permissions->count() > 0 && !$config->isPermissible()) {
            $this->context->buildViolation($constraint->identityNotPermissibleMessage)
                ->atPath($constraint->permissions)
                ->setParameter('%class_property%', $constraint->identityClass)
                ->setParameter('%class%', $config->getType())
                ->addViolation()
            ;
        }
    }
private function validatePermissions(
        Sharing $constraint,
        SharingIdentityConfigInterface $config,
        Collection $permissions
    ): void {
        if ($permissions->count() > 0 && !$config->isPermissible()) {
            $this->context->buildViolation($constraint->identityNotPermissibleMessage)
                ->atPath($constraint->permissions)
                ->setParameter('%class_property%', $constraint->identityClass)
                ->setParameter('%class%', $config->getType())
                ->addViolation()
            ;
        }
    }
private function validatePermissions ( Sharing $ constraint , SharingIdentityConfigInterface $ config , Collection $ permissions ) : void { if ( $ permissions -> count ( ) > 0 && ! $ config -> isPermissible ( ) ) { $ this -> context -> buildViolation ( $ constraint -> identityNotPermissibleMessage ) -> atPath ( $ constraint -> permissions ) -> setParameter ( '%class_property%' , $ constraint -> identityClass ) -> setParameter ( '%class%' , $ config -> getType ( ) ) -> addViolation ( ) ; } }
Validate the permissions field.

@param Sharing                        $constraint  The sharing constraint
@param SharingIdentityConfigInterface $config      The sharing identity config
@param Collection                     $permissions The permissions
Validate the permissions field .