Skip to content

Commit

Permalink
Fix wrong variable name in LessThan and LessThanOrEqual asserts (#3971)
Browse files Browse the repository at this point in the history
* Fix wrong variable name in LessThan and LessThanOrEqual asserts

* After run ./bin/php-symfony-petstore.sh
  • Loading branch information
reznikartem authored and wing328 committed Sep 28, 2019
1 parent e901132 commit 0bf9926
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
{{/minimum}}
{{#maximum}}
{{#exclusiveMaximum}}
$asserts[] = new Assert\LessThan({{minimum}});
$asserts[] = new Assert\LessThan({{maximum}});
{{/exclusiveMaximum}}
{{^exclusiveMaximum}}
$asserts[] = new Assert\LessThanOrEqual({{minimum}});
$asserts[] = new Assert\LessThanOrEqual({{maximum}});
{{/exclusiveMaximum}}
{{/maximum}}
{{#pattern}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function getOrderByIdAction(Request $request, $orderId)
$asserts[] = new Assert\NotNull();
$asserts[] = new Assert\Type("int");
$asserts[] = new Assert\GreaterThanOrEqual(1);
$asserts[] = new Assert\LessThanOrEqual(1);
$asserts[] = new Assert\LessThanOrEqual(5);
$response = $this->validate($orderId, $asserts);
if ($response instanceof Response) {
return $response;
Expand Down

0 comments on commit 0bf9926

Please sign in to comment.