Validator/Constraints/SharingValidator.php
private function validateSubject(Sharing $constraint, $subjectClass): void
    {
        $res = $this->validateClass($constraint, $subjectClass, $constraint->subjectClass);

        if ($res && !$this->sharingManager->hasSharingVisibility(SubjectIdentity::fromClassname($subjectClass))) {
            $this->context->buildViolation($constraint->classNotManagedMessage)
                ->atPath($constraint->subjectClass)
                ->setParameter('%class_property%', $constraint->subjectClass)
                ->setParameter('%class%', $subjectClass)
                ->addViolation()
            ;
        }
    }
private function validateSubject(Sharing $constraint, $subjectClass): void
    {
        $res = $this->validateClass($constraint, $subjectClass, $constraint->subjectClass);

        if ($res && !$this->sharingManager->hasSharingVisibility(SubjectIdentity::fromClassname($subjectClass))) {
            $this->context->buildViolation($constraint->classNotManagedMessage)
                ->atPath($constraint->subjectClass)
                ->setParameter('%class_property%', $constraint->subjectClass)
                ->setParameter('%class%', $subjectClass)
                ->addViolation()
            ;
        }
    }
private function validateSubject ( Sharing $ constraint , $ subjectClass ) : void { $ res = $ this -> validateClass ( $ constraint , $ subjectClass , $ constraint -> subjectClass ) ; if ( $ res && ! $ this -> sharingManager -> hasSharingVisibility ( SubjectIdentity :: fromClassname ( $ subjectClass ) ) ) { $ this -> context -> buildViolation ( $ constraint -> classNotManagedMessage ) -> atPath ( $ constraint -> subjectClass ) -> setParameter ( '%class_property%' , $ constraint -> subjectClass ) -> setParameter ( '%class%' , $ subjectClass ) -> addViolation ( ) ; } }
Validate the subject.

@param Sharing $constraint   The sharing constraint
@param string  $subjectClass The subject class
Validate the subject .