Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FAU-441] feat: update container definition for view repository #41

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Infrastructure/Repository/RepositoryModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Fau\DegreeProgram\Common\Infrastructure\Repository\CampoKeysRepository;
use Fau\DegreeProgram\Common\Infrastructure\Repository\FacultyRepository;
use Fau\DegreeProgram\Common\Infrastructure\Repository\IdGenerator;
use Fau\DegreeProgram\Common\Infrastructure\Repository\TimestampRepository;
use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramCollectionRepository;
use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramRepository;
use Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramViewRepository;
Expand Down Expand Up @@ -98,13 +99,14 @@
}

/**
* @return array<string, callable(ContainerInterface):mixed>

Check failure on line 102 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

MixedReturnTypeCoercion

src/Infrastructure/Repository/RepositoryModule.php:102:16: MixedReturnTypeCoercion: The declared return type 'array<string, callable(Psr\Container\ContainerInterface):mixed>' for Fau\DegreeProgram\Output\Infrastructure\Repository\RepositoryModule::makeDatabaseViewRepositoryDefinition is more specific than the inferred return type 'array{'Fau\\DegreeProgram\\Common\\Application\\ConditionalFieldsFilter'::class: pure-Closure():Fau\DegreeProgram\Common\Application\ConditionalFieldsFilter, 'Fau\\DegreeProgram\\Common\\Domain\\DegreeProgramRepository'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Repository\\FacultyRepository'::class: pure-Closure():Fau\DegreeProgram\Common\Infrastructure\Repository\FacultyRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Repository\\WordPressDatabaseDegreeProgramViewRepository'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramViewRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Sanitizer\\HtmlDegreeProgramSanitizer'::class: pure-Closure():Fau\DegreeProgram\Common\Infrastructure\Sanitizer\HtmlDegreeProgramSanitizer, ...<mixed, pure-Closure():mixed>}' (see https://psalm.dev/197)
*/
private function makeDatabaseViewRepositoryDefinition(): array
{
return [

Check failure on line 106 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

MixedReturnTypeCoercion

src/Infrastructure/Repository/RepositoryModule.php:106:16: MixedReturnTypeCoercion: The type 'array{'Fau\\DegreeProgram\\Common\\Application\\ConditionalFieldsFilter'::class: pure-Closure():Fau\DegreeProgram\Common\Application\ConditionalFieldsFilter, 'Fau\\DegreeProgram\\Common\\Domain\\DegreeProgramRepository'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Repository\\FacultyRepository'::class: pure-Closure():Fau\DegreeProgram\Common\Infrastructure\Repository\FacultyRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Repository\\WordPressDatabaseDegreeProgramViewRepository'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramViewRepository, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Sanitizer\\HtmlDegreeProgramSanitizer'::class: pure-Closure():Fau\DegreeProgram\Common\Infrastructure\Sanitizer\HtmlDegreeProgramSanitizer, ...<mixed, pure-Closure():mixed>}' is more general than the declared return type 'array<string, callable(Psr\Container\ContainerInterface):mixed>' for Fau\DegreeProgram\Output\Infrastructure\Repository\RepositoryModule::makeDatabaseViewRepositoryDefinition (see https://psalm.dev/197)
ConditionalFieldsFilter::class => static fn() => new ConditionalFieldsFilter(),
FacultyRepository::class => static fn() => new FacultyRepository(),
TimestampRepository::class => static fn() => new TimestampRepository(),

Check failure on line 109 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

UndefinedClass

src/Infrastructure/Repository/RepositoryModule.php:109:13: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\Repository\TimestampRepository does not exist (see https://psalm.dev/019)

Check failure on line 109 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

UndefinedClass

src/Infrastructure/Repository/RepositoryModule.php:109:62: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\Repository\TimestampRepository does not exist (see https://psalm.dev/019)
HtmlDegreeProgramSanitizer::class =>
static fn(): DegreeProgramSanitizer => new HtmlDegreeProgramSanitizer(),
DegreeProgramRepository::class => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramRepository(
Expand All @@ -113,11 +115,12 @@
$container->get(HtmlDegreeProgramSanitizer::class),
$container->get(CampoKeysRepository::class),
),
WordPressDatabaseDegreeProgramViewRepository::class => static fn(ContainerInterface $container) => new WordPressDatabaseDegreeProgramViewRepository(

Check failure on line 118 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

TooManyArguments

src/Infrastructure/Repository/RepositoryModule.php:118:112: TooManyArguments: Too many arguments for Fau\DegreeProgram\Common\Infrastructure\Repository\WordPressDatabaseDegreeProgramViewRepository::__construct - expecting 4 but saw 5 (see https://psalm.dev/026)
$container->get(DegreeProgramRepository::class),
$container->get(HtmlDegreeProgramSanitizer::class),
$container->get(ConditionalFieldsFilter::class),
$container->get(FacultyRepository::class),
$container->get(TimestampRepository::class),

Check failure on line 123 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

UndefinedClass

src/Infrastructure/Repository/RepositoryModule.php:123:33: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\Repository\TimestampRepository does not exist (see https://psalm.dev/019)

Check failure on line 123 in src/Infrastructure/Repository/RepositoryModule.php

View workflow job for this annotation

GitHub Actions / static-code-analysis-php / static-analysis-php

MixedArgument

src/Infrastructure/Repository/RepositoryModule.php:123:33: MixedArgument: Argument 1 of Psr\Container\ContainerInterface::get cannot be mixed, expecting string (see https://psalm.dev/030)
),
];
}
Expand Down
Loading