8000 [Serializer][Validator] Update some phpDoc relative to "getters" by guilliamxavier · Pull Request #40786 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function hasCacheableSupportsMethod(): bool
}

/**
* 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
{
Expand All @@ -77,7 +77,7 @@ private function supports(string $class): bool
}

/**
* 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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function addPropertyConstraints($property, array $constraints)
* 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
*
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Validator/Mapping/GetterMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* 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
Expand Down
0