@@ -34,7 +34,7 @@ private function getClient(array $options): EventsClient
3434 return new EventsClient (
3535 'https://example.com/ ' ,
3636 'testToken ' ,
37- $ options
37+ $ options,
3838 );
3939 }
4040
@@ -43,13 +43,13 @@ public function testCreateClientEmptyBackoffAndUserAgent(): void
4343 self ::expectException (ClientException::class);
4444 self ::expectExceptionMessageMatches (
4545 // phpcs:ignore Generic.Files.LineLength
46- '#Value "" is invalid: "backoffMaxTries" option must be provided\s*Value "" is invalid: "userAgent" option must be provided# '
46+ '#Value "" is invalid: "backoffMaxTries" option must be provided\s*Value "" is invalid: "userAgent" option must be provided# ' ,
4747 );
4848 new EventsClient (
4949 'http://example.com/ ' ,
5050 'testToken ' ,
5151 // @phpstan-ignore-next-line
52- []
52+ [],
5353 );
5454 }
5555
@@ -58,41 +58,41 @@ public function testCreateClientInvalidBackoff(): void
5858 self ::expectException (ClientException::class);
5959 // phpcs:ignore Generic.Files.LineLength
6060 self ::expectExceptionMessage (
61- 'Invalid parameters when creating client: Value "abc" is invalid: This value should be a valid number. '
61+ 'Invalid parameters when creating client: Value "abc" is invalid: This value should be a valid number. ' ,
6262 );
6363 new EventsClient (
6464 'http://example.com/ ' ,
6565 'testToken ' ,
6666 // @phpstan-ignore-next-line
67- ['backoffMaxTries ' => 'abc ' , 'userAgent ' => 'boo ' ]
67+ ['backoffMaxTries ' => 'abc ' , 'userAgent ' => 'boo ' ],
6868 );
6969 }
7070
7171 public function testCreateClientTooLowBackoff (): void
7272 {
7373 self ::expectException (ClientException::class);
7474 self ::expectExceptionMessage (
75- 'Invalid parameters when creating client: Value "-1" is invalid: This value should be between 0 and 100. '
75+ 'Invalid parameters when creating client: Value "-1" is invalid: This value should be between 0 and 100. ' ,
7676 );
7777 new EventsClient (
7878 'http://example.com/ ' ,
7979 'testToken ' ,
8080 // @phpstan-ignore-next-line
81- ['backoffMaxTries ' => -1 ]
81+ ['backoffMaxTries ' => -1 ],
8282 );
8383 }
8484
8585 public function testCreateClientTooHighBackoff (): void
8686 {
8787 self ::expectException (ClientException::class);
8888 self ::expectExceptionMessage (
89- 'Invalid parameters when creating client: Value "101" is invalid: This value should be between 0 and 100. '
89+ 'Invalid parameters when creating client: Value "101" is invalid: This value should be between 0 and 100. ' ,
9090 );
9191 new EventsClient (
9292 'http://example.com/ ' ,
9393 'testToken ' ,
9494 // @phpstan-ignore-next-line
95- ['backoffMaxTries ' => 101 ]
95+ ['backoffMaxTries ' => 101 ],
9696 );
9797 }
9898
@@ -106,7 +106,7 @@ public function testCreateClientInvalidUrl(): void
106106 [
107107 'backoffMaxTries ' => 3 ,
108108 'userAgent ' => 'Test ' ,
109- ]
109+ ],
110110 );
111111 }
112112
@@ -126,9 +126,9 @@ private function getPostEventData(): Event
126126 'keboola.orchestrator ' ,
127127 'Orchestrator ' ,
128128 'my-configuration ' ,
129- 'My configuration '
130- )
131- )
129+ 'My configuration ' ,
130+ ),
131+ ),
132132 );
133133 }
134134
@@ -138,7 +138,7 @@ public function testClientRequestResponse(): void
138138 new Response (
139139 202 ,
140140 ['Content-Type ' => 'application/json ' ],
141- null
141+ null ,
142142 ),
143143 ]);
144144 // Add the history middleware to the handler stack.
@@ -174,7 +174,7 @@ public function testLogger(): void
174174 "configRow": null,
175175 "tag": null,
176176 "createdTime": "2021-03-04T21:59:49+00:00"
177- } '
177+ } ',
178178 ),
179179 ]);
180180 // Add the history middleware to the handler stack.
@@ -189,7 +189,7 @@ public function testLogger(): void
189189 'logger ' => $ logger ,
190190 'backoffMaxTries ' => 3 ,
191191 'userAgent ' => 'test agent ' ,
192- ]
192+ ],
193193 );
194194 $ client ->postEvent ($ this ->getPostEventData ());
195195 /** @var Request $request */
@@ -205,12 +205,12 @@ public function testRetrySuccess(): void
205205 new Response (
206206 500 ,
207207 ['Content-Type ' => 'application/json ' ],
208- '{"message" => "Out of order"} '
208+ '{"message" => "Out of order"} ' ,
209209 ),
210210 new Response (
211211 501 ,
212212 ['Content-Type ' => 'application/json ' ],
213- 'Out of order '
213+ 'Out of order ' ,
214214 ),
215215 new Response (
216216 200 ,
@@ -226,7 +226,7 @@ public function testRetrySuccess(): void
226226 "configRow": null,
227227 "tag": null,
228228 "createdTime": "2021-03-04T21:59:49+00:00"
229- } '
229+ } ',
230230 ),
231231 ]);
232232 // Add the history middleware to the handler stack.
@@ -241,7 +241,7 @@ public function testRetrySuccess(): void
241241 'backoffMaxTries ' => 3 ,
242242 'userAgent ' => 'Test ' ,
243243 'logger ' => $ logger ,
244- ]
244+ ],
245245 );
246246 $ client ->postEvent ($ this ->getPostEventData ());
247247 self ::assertCount (3 , $ requestHistory );
@@ -262,7 +262,7 @@ public function testRetryFailure(): void
262262 $ responses [] = new Response (
263263 500 ,
264264 ['Content-Type ' => 'application/json ' ],
265- '{"message" => "Out of order"} '
265+ '{"message" => "Out of order"} ' ,
266266 );
267267 }
268268 $ mock = new MockHandler ($ responses );
@@ -273,7 +273,7 @@ public function testRetryFailure(): void
273273 $ stack ->push ($ history );
274274 $ logger = new TestLogger ();
275275 $ client = $ this ->getClient (
276- ['handler ' => $ stack , 'backoffMaxTries ' => 1 , 'userAgent ' => 'Test ' , 'logger ' => $ logger ]
276+ ['handler ' => $ stack , 'backoffMaxTries ' => 1 , 'userAgent ' => 'Test ' , 'logger ' => $ logger ],
277277 );
278278 try {
279279 $ client ->postEvent ($ this ->getPostEventData ());
@@ -291,7 +291,7 @@ public function testNoRetry(): void
291291 new Response (
292292 401 ,
293293 ['Content-Type ' => 'application/json ' ],
294- '{"message" => "Unauthorized"} '
294+ '{"message" => "Unauthorized"} ' ,
295295 ),
296296 ]);
297297 // Add the history middleware to the handler stack.
0 commit comments