@@ -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'); |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $this->albumRepository->save($album); |
| 55 | 55 | |
| 56 | 56 | $this->eventHandler->fire( |
| 57 | - static function (ContainerInterface $c) use ($album, $audioFile): void { |
|
| 57 | + static function(ContainerInterface $c) use ($album, $audioFile): void { |
|
| 58 | 58 | $c->get(AlbumCoverUpdaterInterface::class)->update($album, $audioFile); |
| 59 | 59 | } |
| 60 | 60 | ); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | 'logger', |
| 30 | 30 | get('catalog_update_logger') |
| 31 | 31 | ), |
| 32 | - 'catalog_update_logger' => static function (ContainerInterface $c): LoggerInterface { |
|
| 32 | + 'catalog_update_logger' => static function(ContainerInterface $c): LoggerInterface { |
|
| 33 | 33 | $config = $c->get(ConfigProviderInterface::class); |
| 34 | 34 | $logger = new Logger('catalog updater'); |
| 35 | 35 | $rotating = new RotatingFileHandler( |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | ->withHeader('Content-Disposition', sprintf('attachment; filename=song%d.mp3', $song->getId())) |
| 28 | 28 | ->withHeader('Content-Length', (string) $size) |
| 29 | 29 | ->withHeader('Cache-Control', 'no-cache') |
| 30 | - ->withHeader('Content-Range', 'bytes 0-'.$size) |
|
| 30 | + ->withHeader('Content-Range', 'bytes 0-' . $size) |
|
| 31 | 31 | //->withHeader('Accept-Ranges', 'bytes') @todo add seek |
| 32 | 32 | ->withBody( |
| 33 | 33 | $this->createStream($song) |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function run(string $command): mixed |
| 24 | 24 | { |
| 25 | - $handle = popen('nice -n 19 '.$command, 'r'); |
|
| 25 | + $handle = popen('nice -n 19 ' . $command, 'r'); |
|
| 26 | 26 | |
| 27 | 27 | if ($handle === false) { |
| 28 | 28 | return null; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | get('transcoding_logger') |
| 30 | 30 | ), |
| 31 | 31 | TranscoderDeterminatorInterface::class => autowire(TranscoderDeterminator::class), |
| 32 | - 'transcoding_logger' => static function (ContainerInterface $c): LoggerInterface { |
|
| 32 | + 'transcoding_logger' => static function(ContainerInterface $c): LoggerInterface { |
|
| 33 | 33 | $config = $c->get(ConfigProviderInterface::class); |
| 34 | 34 | $logger = new Logger('transcoder'); |
| 35 | 35 | $rotating = new RotatingFileHandler( |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | $command = sprintf( |
| 45 | 45 | 'ffmpeg -i %s -vn -nostats -ar 44100 -ac 2 -b:a %dk -f %s pipe:1 2>/dev/null', |
| 46 | - escapeshellarg((string)$this->file_path), |
|
| 46 | + escapeshellarg((string) $this->file_path), |
|
| 47 | 47 | $this->bitrate, |
| 48 | 48 | escapeshellarg($this->codec), |
| 49 | 49 | ); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | break; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $this->logger?->debug(sprintf('buffer %d bytes (+%d)', strlen($this->buffer) + strlen($chunk), strlen($chunk), )); |
|
| 66 | + $this->logger?->debug(sprintf('buffer %d bytes (+%d)', strlen($this->buffer) + strlen($chunk), strlen($chunk),)); |
|
| 67 | 67 | |
| 68 | 68 | $this->buffer .= $chunk; |
| 69 | 69 | |