8000 [Serializer][Validator] Update some phpDoc relative to "getters" · symfony/symfony@5046500 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5046500

Browse files
guilliamxavierfabpot
authored andcommitted
[Serializer][Validator] Update some phpDoc relative to "getters"
1 parent e1f2e81 commit 5046500

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function hasCacheableSupportsMethod(): bool
6161
}
6262

6363
/**
64-
* Checks if the given class has any get{Property} method.
64+
* Checks if the given class has any getter method.
6565
*/
6666
private function supports(string $class): bool
6767
{
@@ -77,7 +77,7 @@ private function supports(string $class): bool
7777
}
7878

7979
/**
80-
* Checks if a method's name is get.* or is.*, and can be called without parameters.
80+
* Checks if a method's name matches /^(get|is|has).+$/ and can be called non-statically without parameters.
8181
*/
8282
private function isGetMethod(\ReflectionMethod $method): bool
8383
{

src/Symfony/Component/Validator/Mapping/ClassMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function addPropertyConstraints($property, array $constraints)
237237
* Adds a constraint to the getter of the given property.
238238
*
239239
* The name of the getter is assumed to be the name of the property with an
240-
* uppercased first letter and either the prefix "get" or "is".
240+
* uppercased first letter and the prefix "get", "is" or "has".
241241
*
242242
* @param string $property The name of the property
243243
*

src/Symfony/Component/Validator/Mapping/GetterMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* method.
1919
*
2020
* A property getter is any method that is equal to the property's name,
21-
* prefixed with either "get" or "is". That method will be used to access the
21+
* prefixed with "get", "is" or "has". That method will be used to access the
2222
* property's value.
2323
*
2424
* The getter will be invoked by reflection, so the access of private and

0 commit comments

Comments
 (0)
0