[Serializer][Validator] Update some phpDoc relative to "getters"

This commit is contained in:
Guilliam Xavier 2021-04-12 18:17:55 +02:00 committed by Fabien Potencier
parent e1f2e81306
commit 5046500deb
3 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer
}
/**
* Checks if the given class has any get{Property} method.
* Checks if the given class has any getter method.
*/
private function supports(string $class): bool
{
@ -77,7 +77,7 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer
}
/**
* Checks if a method's name is get.* or is.*, and can be called without parameters.
* Checks if a method's name matches /^(get|is|has).+$/ and can be called non-statically without parameters.
*/
private function isGetMethod(\ReflectionMethod $method): bool
{

View File

@ -237,7 +237,7 @@ class ClassMetadata extends GenericMetadata implements ClassMetadataInterface
* Adds a constraint to the getter of the given property.
*
* The name of the getter is assumed to be the name of the property with an
* uppercased first letter and either the prefix "get" or "is".
* uppercased first letter and the prefix "get", "is" or "has".
*
* @param string $property The name of the property
*

View File

@ -18,7 +18,7 @@ use Symfony\Component\Validator\Exception\ValidatorException;
* method.
*
* A property getter is any method that is equal to the property's name,
* prefixed with either "get" or "is". That method will be used to access the
* prefixed with "get", "is" or "has". That method will be used to access the
* property's value.
*
* The getter will be invoked by reflection, so the access of private and