minor #40786 [Serializer][Validator] Update some phpDoc relative to "getters" (guilliamxavier)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Serializer][Validator] Update some phpDoc relative to "getters"
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yesish (phpDoc unaccurate after code updates)
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
Commits
-------
5046500deb
[Serializer][Validator] Update some phpDoc relative to "getters"
This commit is contained in:
commit
3f42c08abd
@ -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
|
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
|
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.
|
* 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
|
* 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
|
* @param string $property The name of the property
|
||||||
*
|
*
|
||||||
|
@ -18,7 +18,7 @@ use Symfony\Component\Validator\Exception\ValidatorException;
|
|||||||
* method.
|
* method.
|
||||||
*
|
*
|
||||||
* A property getter is any method that is equal to the property's name,
|
* 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.
|
* property's value.
|
||||||
*
|
*
|
||||||
* The getter will be invoked by reflection, so the access of private and
|
* The getter will be invoked by reflection, so the access of private and
|
||||||
|
Reference in New Issue
Block a user