1 | <?php |
||
2 | |||
3 | namespace Graze\WipotecCheckweigherClient\Request; |
||
4 | |||
5 | class RequestChangeArticle extends AbstractRequestArticle |
||
6 | { |
||
7 | /** @var bool */ |
||
8 | private $resetCounter; |
||
9 | |||
10 | /** |
||
11 | * @return string |
||
12 | */ |
||
13 | protected function getId() |
||
14 | { |
||
15 | return 'change_article'; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * @param bool $resetCounter |
||
20 | */ |
||
21 | public function setResetCounter($resetCounter) |
||
22 | { |
||
23 | $this->resetCounter = $resetCounter; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return mixed[] |
||
28 | */ |
||
29 | protected function getParams() |
||
30 | { |
||
31 | $params = parent::getParams(); |
||
32 | |||
33 | if (!is_null($this->resetCounter)) { |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
34 | $params['article_definition']['reset_counter'] = (int)$this->resetCounter; |
||
35 | } |
||
36 | |||
37 | return $params; |
||
38 | } |
||
39 | } |
||
40 |