public function getMethod(ClassReflection $classReflection, string $methodName) : MethodReflection
 {
     $metadata = $this->metadataSource->getMetadataForClass($classReflection->getNativeReflection());
     $sentryMethodSearchResult = $metadata->getSentryMethodByNameAndRequiredVisibility($methodName, Visibility::get(Visibility::VISIBILITY_PRIVATE));
     $property = $sentryMethodSearchResult->getProperty();
     $sentryMethod = $sentryMethodSearchResult->getSentryMethod();
     $sentryAccess = $sentryMethod->getSentryAccess();
     $isSetter = $sentryAccess->equals(new SentryAccess('set'));
     $methodHasParameter = $isSetter || $sentryAccess->equals(new SentryAccess('add')) || $sentryAccess->equals(new SentryAccess('remove')) || $sentryAccess->equals(new SentryAccess('contains'));
     $propertyClass = $this->broker->getClass($property->getClassName());
     return new SentryMethodReflection($methodName, $propertyClass, $sentryMethod->getMethodVisibility(), $this->phpClassReflectionExtension->getProperty($propertyClass, $property->getName())->getType(), $methodHasParameter ? $isSetter ? $property->isNullable() : false : null);
 }
 public function isPublic() : bool
 {
     return $this->visibility->equalsValue(Visibility::VISIBILITY_PUBLIC);
 }