Skip to content

Commit

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

* Fix wrong variable name in LessThan and LessThanOrEqual asserts

* After run ./bin/php-symfony-petstore.sh
  • Loading branch information
reznikartem authored and Jesse Michael committed Oct 3, 2019
1 parent 2046e90 commit a1fff4b
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 a1fff4b

Please sign in to comment.