@@ -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 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | ), |
| 81 | 81 | default => new ArrayAdapter(), |
| 82 | 82 | }; |
| 83 | - } catch (CacheException|ConnectionException $e) { |
|
| 83 | + } catch (CacheException | ConnectionException $e) { |
|
| 84 | 84 | $this->logger->error('Cache initialization failed', [$e->getMessage()]); |
| 85 | 85 | |
| 86 | 86 | $cacheHandler = new ArrayAdapter(); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | return [ |
| 14 | 14 | CacheProviderInterface::class => autowire(CacheProvider::class), |
| 15 | - ClientInterface::class => static function (ConfigProviderInterface $config): Client { |
|
| 15 | + ClientInterface::class => static function(ConfigProviderInterface $config): Client { |
|
| 16 | 16 | $client = new Client( |
| 17 | 17 | $config->getRedisUri() |
| 18 | 18 | ); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | return [ |
| 29 | 29 | Psr17Factory::class => autowire(), |
| 30 | 30 | getID3::class => autowire(), |
| 31 | - EntityManagerInterface::class => static function ( |
|
| 31 | + EntityManagerInterface::class => static function( |
|
| 32 | 32 | ConfigProviderInterface $config, |
| 33 | 33 | CacheProviderInterface $cacheProvider, |
| 34 | 34 | ): EntityManagerInterface { |