Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit bf74faa

Browse files
committed
🚿
1 parent 32c1f0c commit bf74faa

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

examples/Providers/Spotify/new-releases.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
$artists[] = $artist->id;
8080
}
8181

82-
$after = $data->artists->cursors->after ?? '';
82+
$after = ($data->artists->cursors->after ?? '');
8383
}
8484
elseif(isset($data->error)){
8585
$logger->error($data->error->message.' ('.$data->error->status.')');
@@ -96,7 +96,7 @@
9696
$artistAlbums = $spotify->request(sprintf('/v1/artists/%s/albums', $id), ['market' => $market]);
9797
$data = MessageUtil::decodeJSON($artistAlbums);
9898

99-
foreach($data->items ?? [] as $album){
99+
foreach(($data->items ?? []) as $album){
100100
$rdate = strtotime($album->release_date);
101101

102102
if($album->release_date_precision === 'day' && $rdate >= $since && $rdate <= $until){
@@ -130,7 +130,7 @@
130130
$albums = $spotify->request('/v1/albums', ['ids' => implode(',', $chunk), 'market' => $market]);
131131
$data = MessageUtil::decodeJSON($albums);
132132

133-
foreach($data?->albums ?? [] as $album){
133+
foreach(($data?->albums ?? []) as $album){
134134
$tracks = array_column($album->tracks->items, 'id');
135135
$id = array_shift($tracks);
136136

examples/provider-example-common.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* @var string $AUTOLOADER - path to an alternate autoloader
2727
*/
28-
require_once $AUTOLOADER ?? __DIR__.'/../vendor/autoload.php';
28+
require_once ($AUTOLOADER ?? __DIR__.'/../vendor/autoload.php');
2929

3030
ini_set('date.timezone', 'Europe/Amsterdam');
3131

@@ -65,6 +65,7 @@
6565
* @var \Psr\Http\Client\ClientInterface $http
6666
* @var \chillerlan\OAuth\Storage\OAuthStorageInterface $storage
6767
*/
68+
//phpcs:ignore
6869
$options = ($options ?? new class ($options_arr) extends OAuthOptions{ use HTTPOptionsTrait; });
6970
$logger = new Logger('log', [new NullHandler]);
7071

src/OpenStreetmap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class OpenStreetmap extends OAuth1Provider{
4444
/**
4545
* @inheritDoc
4646
*/
47-
public function me(bool $json = true):ResponseInterface{
48-
$response = $this->request('/api/0.6/user/details'.(($json) ? '.json' : ''));
47+
public function me(bool $json = null):ResponseInterface{
48+
$response = $this->request('/api/0.6/user/details'.(($json ?? true) ? '.json' : ''));
4949
$status = $response->getStatusCode();
5050

5151
if($status === 200){

tests/Unit/MailChimpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function setUp():void{
3737
$this->token = new AccessToken([
3838
'accessToken' => 'test_access_token_secret',
3939
'expires' => 1,
40-
'extraParams' => ['dc' => 'bar']
40+
'extraParams' => ['dc' => 'bar'],
4141
]);
4242
}
4343

0 commit comments

Comments
 (0)