8000 Recursive denormalize with property info by mihai-stancu · Pull Request #17193 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Recursive denormalize with property info #17193

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 13 commits into from
Prev Previous commit
Next Next commit
Exception wording
  • Loading branch information
dunglas committed Dec 30, 2015
commit a783ffa429419abda5dfcd327d6a89b15e6816e5
8 changes: 2 additions & 6 deletions src/Symfony/Component/Serializer/Annotation/MaxDepth.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ public function __construct(array $data)
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', get_class($this)));
}

if (!is_int($data['value'])) {
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be an int.', get_class($this)));
}

if ($data['value'] <= 0) {
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be greater than 0.', get_class($this)));
if (!is_int($data['value']) || $data['value'] <= 0) {
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a positive integer.', get_class($this)));
}

$this->maxDepth = $data['value'];
Expand Down
0