@@ -51,7 +51,7 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $this->eventHandler->fire( |
| 54 | - static function (ContainerInterface $c) use ($disc): void { |
|
| 54 | + static function(ContainerInterface $c) use ($disc): void { |
|
| 55 | 55 | $c->get(DiscLengthUpdaterInterface::class)->update($disc); |
| 56 | 56 | } |
| 57 | 57 | ); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | |
| 11 | 11 | require __DIR__ . '/../../vendor/autoload.php'; |
| 12 | 12 | |
| 13 | -Init::run(static function (ContainerInterface $dic): void { |
|
| 13 | +Init::run(static function(ContainerInterface $dic): void { |
|
| 14 | 14 | $dic->get(ApiApplication::class)->run( |
| 15 | 15 | AppFactory::createFromContainer($dic), |
| 16 | 16 | new Logger('api') |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | ->withHeader('Cache-Control', sprintf('public, max-age=%d', $this->config->getClientCacheMaxAge())) |
| 66 | 66 | ->withHeader('Last-Modified', (string) $lastModified?->format(DATE_RFC7231)) |
| 67 | 67 | ->withHeader('Content-Type', $artContent['mimeType']) |
| 68 | - ->withHeader('Content-Disposition', 'filename='.$filename) |
|
| 68 | + ->withHeader('Content-Disposition', 'filename=' . $filename) |
|
| 69 | 69 | ->withBody( |
| 70 | 70 | $this->psr17Factory->createStream($artContent['content']) |
| 71 | 71 | ); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | 'id' => (string) $artistId, |
| 50 | 50 | 'name' => (string) $artist->getTitle(), |
| 51 | 51 | 'artistImageUrl' => '', |
| 52 | - 'coverArtId' => 'artist-'.$artistId, |
|
| 52 | + 'coverArtId' => 'artist-' . $artistId, |
|
| 53 | 53 | 'albumCount' => $artist->getAlbumCount(), |
| 54 | 54 | 'starred' => null, |
| 55 | 55 | ]; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | // use the provided salt to hash the token |
| 37 | 37 | if ( |
| 38 | 38 | $accessKeyFromStorage === null || |
| 39 | - $token !== md5($accessKeyFromStorage.$salt) |
|
| 39 | + $token !== md5($accessKeyFromStorage . $salt) |
|
| 40 | 40 | ) { |
| 41 | 41 | throw new AuthenticationFailedException(); |
| 42 | 42 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $albums[] = [ |
| 59 | 59 | 'id' => $albumId, |
| 60 | 60 | 'name' => (string) $album->getTitle(), |
| 61 | - 'coverArtId' => 'album-'.$albumId, |
|
| 61 | + 'coverArtId' => 'album-' . $albumId, |
|
| 62 | 62 | 'songCount' => $album->getSongCount(), |
| 63 | 63 | 'createDate' => null, // @todo implement, |
| 64 | 64 | 'duration' => $album->getLength(), |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | return [ |
| 71 | 71 | 'id' => $artistId, |
| 72 | 72 | 'name' => $artistName, |
| 73 | - 'coverArtId' => 'artist-'.$artistId, |
|
| 73 | + 'coverArtId' => 'artist-' . $artistId, |
|
| 74 | 74 | 'artistImageUrl' => '', |
| 75 | 75 | 'albumCount' => $artist->getAlbumCount(), |
| 76 | 76 | 'albums' => $albums, |
@@ -50,8 +50,8 @@ |
||
| 50 | 50 | * @return Traversable<AlbumInterface> |
| 51 | 51 | */ |
| 52 | 52 | public function getListOrderedByArtist( |
| 53 | - null|int $limit = null, |
|
| 54 | - null|int $offset = null, |
|
| 53 | + null | int $limit = null, |
|
| 54 | + null | int $offset = null, |
|
| 55 | 55 | ?int $catalogId = null, |
| 56 | 56 | ): Traversable; |
| 57 | 57 | } |
@@ -163,8 +163,8 @@ |
||
| 163 | 163 | * @return Generator<AlbumInterface> |
| 164 | 164 | */ |
| 165 | 165 | public function getListOrderedByArtist( |
| 166 | - null|int $limit = null, |
|
| 167 | - null|int $offset = null, |
|
| 166 | + null | int $limit = null, |
|
| 167 | + null | int $offset = null, |
|
| 168 | 168 | ?int $catalogId = null, |
| 169 | 169 | ): Generator { |
| 170 | 170 | $query_builder = $this |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - $validator = static function ($password): string { |
|
| 44 | + $validator = static function($password): string { |
|
| 45 | 45 | $password = trim((string) $password); |
| 46 | 46 | if (mb_strlen($password) < PasswordVerificator::PASSWORD_MIN_LENGTH) { |
| 47 | 47 | throw new InvalidArgumentException('Password too short'); |