Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PropertyAccess] Throw an InvalidArgumentException when the type do not match #17738

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

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add missing return statement. Update PHPDoc
  • Loading branch information
dunglas committed Feb 9, 2016
commit 762e5b181fe2bbbcd21421ba9f13223134486624
2 changes: 2 additions & 0 deletions src/Symfony/Component/PropertyAccess/PropertyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ private function callMethod($object, $method, $value) {
} catch (\TypeError $e) {
throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
}

return;
}

// PHP 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface PropertyAccessorInterface
* @param string|PropertyPathInterface $propertyPath The property path to modify
* @param mixed $value The value to set at the end of the property path
*
* @throws Exception\InvalidArgumentException If the property path is invalid
* @throws Exception\InvalidArgumentException If the property path is invalid or the value type do not match with the setter type hint

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo : does not match instead of do not match

* @throws Exception\AccessException If a property/index does not exist or is not public
* @throws Exception\UnexpectedTypeException If a value within the path is neither object
* nor array
Expand Down