File tree 3 files changed +12
-10
lines changed 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 36
36
- name : Install dependencies
37
37
run : composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
38
38
39
+ - name : PHP Security Checker
40
+ uses : symfonycorp/security-checker-action@v2
41
+ if : ${{ matrix.stability == 'prefer-stable' }}
42
+
39
43
- name : Execute tests
40
44
run : vendor/bin/phpunit --coverage-clover=coverage.clover --verbose
41
45
42
46
- name : Upload Code Coverage
43
- run : wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
47
+ run : wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Original file line number Diff line number Diff line change @@ -224,12 +224,10 @@ public function buildAuth()
224
224
*/
225
225
public function buildOptions (array $ options = [])
226
226
{
227
- return array_merge_recursive (
228
- $ options ,
229
- [
230
- 'headers ' => $ this ->getHeaders (),
231
- ]
232
- );
227
+ return [
228
+ 'body ' => json_encode ($ options ?? []),
229
+ 'headers ' => $ this ->getHeaders (),
230
+ ];
233
231
}
234
232
235
233
/**
@@ -340,7 +338,7 @@ public function getPassword()
340
338
*
341
339
* @return string
342
340
*/
343
- public function getUrl ($ path = null )
341
+ public function getUrl ($ path = '' )
344
342
{
345
343
return $ this ->url . '/v4_6_release/apis/3.0/ ' . ltrim ($ path , '/ ' );
346
344
}
@@ -395,7 +393,7 @@ protected function isCollection(array $array)
395
393
*/
396
394
protected function isLastPage (ResponseInterface $ response )
397
395
{
398
- return !(bool )preg_match ('/rel="last"$/u ' , $ response ->getHeader ('Link ' )[0 ] ?? null );
396
+ return !(bool )preg_match ('/rel="last"$/u ' , $ response ->getHeader ('Link ' )[0 ] ?? '' );
399
397
}
400
398
401
399
/**
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ public function it_builds_the_expected_options_array()
294
294
$ this ->client ->setIntegrator ($ username );
295
295
296
296
$ options = [
297
- 'extra ' => ' option ' ,
297
+ 'body ' => json_encode ([ ' extra ' => ' option ']) ,
298
298
'headers ' => [
299
299
'added ' => 'header ' ,
300
300
'Accept ' => 'application/vnd.connectwise.com+json; version=2019.5 ' ,
You can’t perform that action at this time.
0 commit comments