@@ 130-133 (lines=4) @@ | ||
127 | */ |
|
128 | public function setPage($page) |
|
129 | { |
|
130 | if (false === is_numeric($page) || $page < 1 || $page > 10) { |
|
131 | throw new \InvalidArgumentException(sprintf('%s is an invalid page value. It has to be numeric, positive and between 1 and 10', |
|
132 | $page)); |
|
133 | } |
|
134 | ||
135 | $this->parameters['ItemPage'] = $page; |
|
136 | ||
@@ 276-279 (lines=4) @@ | ||
273 | */ |
|
274 | protected function validatePrice($price) |
|
275 | { |
|
276 | if (false === is_numeric($price) || $price < 0) { |
|
277 | throw new \InvalidArgumentException(sprintf('%s is an invalid price value. It has to be numeric and >= than 0', |
|
278 | $price)); |
|
279 | } |
|
280 | } |
|
281 | } |
|
282 |