@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | require __DIR__ . '/../../vendor/autoload.php'; |
| 24 | 24 | |
| 25 | -Init::run(static function (ContainerInterface $dic): void { |
|
| 25 | +Init::run(static function(ContainerInterface $dic): void { |
|
| 26 | 26 | /** @var ConfigProviderInterface $config */ |
| 27 | 27 | $config = $dic->get(ConfigProviderInterface::class); |
| 28 | 28 | |
@@ -22,25 +22,25 @@ |
||
| 22 | 22 | use Uxmp\Core\Orm\Repository\UserRepositoryInterface; |
| 23 | 23 | |
| 24 | 24 | return [ |
| 25 | - ArtistRepositoryInterface::class => function (ContainerInterface $c): ArtistRepositoryInterface { |
|
| 25 | + ArtistRepositoryInterface::class => function(ContainerInterface $c): ArtistRepositoryInterface { |
|
| 26 | 26 | return $c->get(EntityManagerInterface::class)->getRepository(Artist::class); |
| 27 | 27 | }, |
| 28 | - AlbumRepositoryInterface::class => function (ContainerInterface $c): AlbumRepositoryInterface { |
|
| 28 | + AlbumRepositoryInterface::class => function(ContainerInterface $c): AlbumRepositoryInterface { |
|
| 29 | 29 | return $c->get(EntityManagerInterface::class)->getRepository(Album::class); |
| 30 | 30 | }, |
| 31 | - SongRepositoryInterface::class => function (ContainerInterface $c): SongRepositoryInterface { |
|
| 31 | + SongRepositoryInterface::class => function(ContainerInterface $c): SongRepositoryInterface { |
|
| 32 | 32 | return $c->get(EntityManagerInterface::class)->getRepository(Song::class); |
| 33 | 33 | }, |
| 34 | - DiscRepositoryInterface::class => function (ContainerInterface $c): DiscRepositoryInterface { |
|
| 34 | + DiscRepositoryInterface::class => function(ContainerInterface $c): DiscRepositoryInterface { |
|
| 35 | 35 | return $c->get(EntityManagerInterface::class)->getRepository(Disc::class); |
| 36 | 36 | }, |
| 37 | - SessionRepositoryInterface::class => function (ContainerInterface $c): SessionRepositoryInterface { |
|
| 37 | + SessionRepositoryInterface::class => function(ContainerInterface $c): SessionRepositoryInterface { |
|
| 38 | 38 | return $c->get(EntityManagerInterface::class)->getRepository(Session::class); |
| 39 | 39 | }, |
| 40 | - UserRepositoryInterface::class => function (ContainerInterface $c): UserRepositoryInterface { |
|
| 40 | + UserRepositoryInterface::class => function(ContainerInterface $c): UserRepositoryInterface { |
|
| 41 | 41 | return $c->get(EntityManagerInterface::class)->getRepository(User::class); |
| 42 | 42 | }, |
| 43 | - CatalogRepositoryInterface::class => function (ContainerInterface $c): CatalogRepositoryInterface { |
|
| 43 | + CatalogRepositoryInterface::class => function(ContainerInterface $c): CatalogRepositoryInterface { |
|
| 44 | 44 | return $c->get(EntityManagerInterface::class)->getRepository(Catalog::class); |
| 45 | 45 | }, |
| 46 | 46 | ]; |
@@ -55,8 +55,4 @@ |
||
| 55 | 55 | $query, |
| 56 | 56 | Disc::class, |
| 57 | 57 | Song::class, |
| 58 | - $catalog->getId(), |
|
| 59 | - )) |
|
| 60 | - ->getResult(); |
|
| 61 | - } |
|
| 62 | -} |
|
| 58 | + $catalog->getId |
|
| 63 | 59 | \ No newline at end of file |
@@ -55,8 +55,4 @@ |
||
| 55 | 55 | $query, |
| 56 | 56 | Disc::class, |
| 57 | 57 | Song::class, |
| 58 | - $catalog->getId(), |
|
| 59 | - )) |
|
| 60 | - ->getResult(); |
|
| 61 | - } |
|
| 62 | -} |
|
| 58 | + $catalog->getId |
|
| 63 | 59 | \ No newline at end of file |
@@ -55,8 +55,4 @@ |
||
| 55 | 55 | $query, |
| 56 | 56 | Disc::class, |
| 57 | 57 | Song::class, |
| 58 | - $catalog->getId(), |
|
| 59 | - )) |
|
| 60 | - ->getResult(); |
|
| 61 | - } |
|
| 62 | -} |
|
| 58 | + $catalog->getId |
|
| 63 | 59 | \ No newline at end of file |
@@ -55,8 +55,4 @@ |
||
| 55 | 55 | $query, |
| 56 | 56 | Disc::class, |
| 57 | 57 | Song::class, |
| 58 | - $catalog->getId(), |
|
| 59 | - )) |
|
| 60 | - ->getResult(); |
|
| 61 | - } |
|
| 62 | -} |
|
| 58 | + $catalog->getId |
|
| 63 | 59 | \ No newline at end of file |
@@ -55,8 +55,4 @@ |
||
| 55 | 55 | $query, |
| 56 | 56 | Disc::class, |
| 57 | 57 | Song::class, |
| 58 | - $catalog->getId(), |
|
| 59 | - )) |
|
| 60 | - ->getResult(); |
|
| 61 | - } |
|
| 62 | -} |
|
| 58 | + $catalog->getId |
|
| 63 | 59 | \ No newline at end of file |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $builder->addDefinitions([ |
| 39 | 39 | Psr17Factory::class => autowire(), |
| 40 | 40 | getID3::class => autowire(), |
| 41 | - ExtractorDeterminatorInterface::class => static function (ContainerInterface $c): ExtractorDeterminatorInterface { |
|
| 41 | + ExtractorDeterminatorInterface::class => static function(ContainerInterface $c): ExtractorDeterminatorInterface { |
|
| 42 | 42 | return new ExtractorDeterminator( |
| 43 | 43 | [ |
| 44 | 44 | $c->get(Id3v2Extractor::class), |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ] |
| 47 | 47 | ); |
| 48 | 48 | }, |
| 49 | - EntityManagerInterface::class => static function (ContainerInterface $c): EntityManagerInterface { |
|
| 49 | + EntityManagerInterface::class => static function(ContainerInterface $c): EntityManagerInterface { |
|
| 50 | 50 | $paths = [__DIR__ . '/../Orm/Model/']; |
| 51 | 51 | $isDevMode = true; |
| 52 | 52 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode); |
| 60 | 60 | return EntityManager::create($dbParams, $config); |
| 61 | 61 | }, |
| 62 | - Dotenv::class => function (): Dotenv { |
|
| 62 | + Dotenv::class => function(): Dotenv { |
|
| 63 | 63 | $dotenv = Dotenv::createImmutable(__DIR__ . '/../../'); |
| 64 | 64 | $dotenv->load(); |
| 65 | 65 | return $dotenv; |
@@ -44,13 +44,13 @@ |
||
| 44 | 44 | $this->albumRepository->save($album); |
| 45 | 45 | |
| 46 | 46 | $this->eventHandler->fire( |
| 47 | - static function (ContainerInterface $c) use ($album, $analysisResult): void { |
|
| 47 | + static function(ContainerInterface $c) use ($album, $analysisResult): void { |
|
| 48 | 48 | $c->get(AlbumCoverUpdaterInterface::class)->update($album, $analysisResult); |
| 49 | 49 | } |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | $this->eventHandler->fire( |
| 53 | - static function (ContainerInterface $c) use ($album, $analysisResult): void { |
|
| 53 | + static function(ContainerInterface $c) use ($album, $analysisResult): void { |
|
| 54 | 54 | $c->get(AlbumCoverUpdaterInterface::class)->update($album, $analysisResult); |
| 55 | 55 | } |
| 56 | 56 | ); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | if ($image !== null) { |
| 27 | 27 | $filename = $destination . '/' . $album->getMbid(); |
| 28 | 28 | if (!file_exists($filename)) { |
| 29 | - $extension = match ($image['image_mime']) { |
|
| 29 | + $extension = match($image['image_mime']) { |
|
| 30 | 30 | 'image/jpeg' => 'jpg', |
| 31 | 31 | 'image/png' => 'png', |
| 32 | 32 | 'image/gif' => 'gif', |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - file_put_contents($filename. '.' . $extension, $image['data']); |
|
| 40 | + file_put_contents($filename . '.' . $extension, $image['data']); |
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | public function execute(): void |
| 29 | 29 | { |
| 30 | 30 | Init::run( |
| 31 | - function (ContainerInterface $dic): void { |
|
| 32 | - $dic->get(CatalogListerInterface::class)->list($this->app()?->io()); |
|
| 31 | + function(ContainerInterface $dic): void { |
|
| 32 | + $dic->get(CatalogListerInterface::class)->list($this->app() ? ->io()); |
|
| 33 | 33 | } |
| 34 | 34 | ); |
| 35 | 35 | } |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | public function execute(?int $catalogId): void |
| 32 | 32 | { |
| 33 | 33 | Init::run( |
| 34 | - function (ContainerInterface $dic) use ($catalogId): void { |
|
| 35 | - $dic->get(CatalogUpdaterInterface::class)->update($this->app()?->io(), (int) $catalogId); |
|
| 34 | + function(ContainerInterface $dic) use ($catalogId) : void { |
|
| 35 | + $dic->get(CatalogUpdaterInterface::class)->update($this->app() ? ->io(), (int) $catalogId); |
|
| 36 | 36 | } |
| 37 | 37 | ); |
| 38 | 38 | } |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | public function execute(?int $catalogId): void |
| 32 | 32 | { |
| 33 | 33 | Init::run( |
| 34 | - function (ContainerInterface $dic) use ($catalogId): void { |
|
| 35 | - $dic->get(CatalogCleanerInterface::class)->clean($this->app()?->io(), (int) $catalogId); |
|
| 34 | + function(ContainerInterface $dic) use ($catalogId) : void { |
|
| 35 | + $dic->get(CatalogCleanerInterface::class)->clean($this->app() ? ->io(), (int) $catalogId); |
|
| 36 | 36 | } |
| 37 | 37 | ); |
| 38 | 38 | } |