[Serializer][Validator] Update some phpDoc relative to "getters"
This commit is contained in:
parent
e1f2e81306
commit
5046500deb
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user