1 | <?php |
||
11 | * @var array |
||
12 | */ |
||
13 | private $hostNames = [ |
||
14 | 'DE' => 'partnernet.amazon.de' |
||
15 | ]; |
||
16 | |||
17 | /** |
||
18 | * @var HttpCrawler |
||
19 | */ |
||
20 | private $client; |
||
21 | |||
22 | /** |
||
23 | * @var String |
||
24 | */ |
||
25 | private $username; |
||
26 | |||
27 | /** |
||
28 | * @var String |
||
29 | */ |
||
30 | private $password; |
||
31 | |||
32 | /** |
||
33 | * @var String |
||
34 | */ |
||
35 | private $host; |
||
36 | |||
37 | /** |
||
38 | * @var String |
||
39 | */ |
||
40 | private $country; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $associateTag; |
||
46 | |||
47 | /** |
||
48 | * @param string $username |
||
49 | * @param string $password |
||
50 | * @param string $country |
||
51 | * |
||
52 | * @throws Exception |
||
53 | */ |
||
54 | public function __construct($username, $password, $country = 'DE') |
||
78 | |||
79 | private function login() |
||
94 | |||
95 | /** |
||
96 | * @param $id |
||
97 | */ |
||
98 | public function setStore($id) |
||
108 | |||
109 | /** |
||
110 | * @param \DateTime $start |
||
111 | * @param \DateTime $end |
||
112 | * @return array |
||
113 | */ |
||
114 | public function getItems(\DateTime $start, \DateTime $end) |
||
136 | |||
137 | /** |
||
138 | * @param \DateTime $start |
||
139 | * @param \DateTime $end |
||
140 | * @return string |
||
141 | */ |
||
142 | private function _getTransactionUrl(\DateTime $start, \DateTime $end) |
||
156 | |||
157 | /** |
||
158 | * @param $tag string |
||
159 | */ |
||
160 | public function setAssociateTag($tag) |
||
164 | |||
165 | /** |
||
166 | */ |
||
167 | private function deactivateCombinedReports() |
||
168 | { |
||
169 | $crawler = $this->client->request('GET', $this->host . 'gp/associates/network/reports/report.html'); |
||
170 | |||
171 | // always deactivate combine buttons |
||
172 | if ($crawler->filter('input[name="combinedReports"]')->attr('checked') === 'checked') { |
||
173 | $form = $crawler->filter('form[name="idbox_combined_reports_form"]')->form(); |
||
174 | $form['combinedReports'] = false; |
||
175 | $this->client->submit($form); |
||
176 | } |
||
179 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: