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-418] Move TranslatedDegreeProgramController to common package #131

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/Infrastructure/RestApi/RestApiModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\MasterDegreeAdmissionRequirementTaxonomy;
use Fau\DegreeProgram\Common\Infrastructure\Content\Taxonomy\TeachingDegreeHigherSemesterAdmissionRequirementTaxonomy;
use Fau\DegreeProgram\Common\Infrastructure\Repository\FacultyRepository;
use Fau\DegreeProgram\Common\Infrastructure\RestApi\TranslatedDegreeProgramController;
use Fau\DegreeProgram\Common\Infrastructure\Sanitizer\SerializedBlocksDegreeProgramSanitizer;
use Fau\DegreeProgram\Common\Infrastructure\Validator\CompositeValidator;
use Fau\DegreeProgram\Common\Infrastructure\Validator\ConditionalFieldsValidator;
Expand All @@ -40,9 +41,9 @@
{
}

public function services(): array

Check failure on line 44 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

MixedReturnTypeCoercion

src/Infrastructure/RestApi/RestApiModule.php:44:33: MixedReturnTypeCoercion: The declared return type 'array<string, callable(Psr\Container\ContainerInterface):mixed>' for Fau\DegreeProgram\Infrastructure\RestApi\RestApiModule::services is more specific than the inferred return type 'array{'Fau\\DegreeProgram\\Application\\DegreeProgramRetriever'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Application\DegreeProgramRetriever, 'Fau\\DegreeProgram\\Application\\DegreeProgramUpdater'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Application\DegreeProgramUpdater, 'Fau\\DegreeProgram\\Common\\Domain\\DegreeProgramDataValidator'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Validator\CompositeValidator, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Validator\\JsonSchemaDegreeProgramDataValidator'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Validator\JsonSchemaDegreeProgramDataValidator, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\DegreeProgramController'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\DegreeProgramController, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\DegreeProgramRequestFilter'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\DegreeProgramRequestFilter, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\TermsParentObjectController'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\TermsParentObjectController, ...<mixed, impure-Closure(Psr\Container\ContainerInterface):mixed>}' (see https://psalm.dev/197)
{
return [

Check failure on line 46 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

MixedReturnTypeCoercion

src/Infrastructure/RestApi/RestApiModule.php:46:16: MixedReturnTypeCoercion: The type 'array{'Fau\\DegreeProgram\\Application\\DegreeProgramRetriever'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Application\DegreeProgramRetriever, 'Fau\\DegreeProgram\\Application\\DegreeProgramUpdater'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Application\DegreeProgramUpdater, 'Fau\\DegreeProgram\\Common\\Domain\\DegreeProgramDataValidator'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Validator\CompositeValidator, 'Fau\\DegreeProgram\\Common\\Infrastructure\\Validator\\JsonSchemaDegreeProgramDataValidator'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Common\Infrastructure\Validator\JsonSchemaDegreeProgramDataValidator, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\DegreeProgramController'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\DegreeProgramController, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\DegreeProgramRequestFilter'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\DegreeProgramRequestFilter, 'Fau\\DegreeProgram\\Infrastructure\\RestApi\\TermsParentObjectController'::class: impure-Closure(Psr\Container\ContainerInterface):Fau\DegreeProgram\Infrastructure\RestApi\TermsParentObjectController, ...<mixed, impure-Closure(Psr\Container\ContainerInterface):mixed>}' is more general than the declared return type 'array<string, callable(Psr\Container\ContainerInterface):mixed>' for Fau\DegreeProgram\Infrastructure\RestApi\RestApiModule::services (see https://psalm.dev/197)
DegreeProgramRetriever::class => static fn(ContainerInterface $container) => new DegreeProgramRetriever(
$container->get(DegreeProgramViewRepository::class)
),
Expand Down Expand Up @@ -76,7 +77,7 @@
$container->get(DegreeProgramUpdater::class),
$container->get(LoggerInterface::class),
),
TranslatedDegreeProgramController::class => static fn(ContainerInterface $container) => new TranslatedDegreeProgramController(

Check failure on line 80 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

UndefinedClass

src/Infrastructure/RestApi/RestApiModule.php:80:13: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\RestApi\TranslatedDegreeProgramController does not exist (see https://psalm.dev/019)

Check failure on line 80 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

UndefinedClass

src/Infrastructure/RestApi/RestApiModule.php:80:105: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\RestApi\TranslatedDegreeProgramController does not exist (see https://psalm.dev/019)
$container->get(DegreeProgramViewRepository::class),
$container->get(DegreeProgramCollectionRepository::class),
),
Expand All @@ -90,7 +91,7 @@
public function run(ContainerInterface $container): bool
{
$degreeProgramController = $container->get(DegreeProgramController::class);
$translatedDegreeProgramController = $container->get(TranslatedDegreeProgramController::class);

Check failure on line 94 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

UndefinedClass

src/Infrastructure/RestApi/RestApiModule.php:94:62: UndefinedClass: Class, interface or enum named Fau\DegreeProgram\Common\Infrastructure\RestApi\TranslatedDegreeProgramController does not exist (see https://psalm.dev/019)

Check failure on line 94 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

MixedArgument

src/Infrastructure/RestApi/RestApiModule.php:94:62: MixedArgument: Argument 1 of Psr\Container\ContainerInterface::get cannot be mixed, expecting string (see https://psalm.dev/030)
$termsParentObjectController = $container->get(TermsParentObjectController::class);
$schema = $container->get(JsonSchemaDegreeProgramDataValidator::class)->draftSchema();

Expand Down Expand Up @@ -130,7 +131,7 @@
);
}

$translatedDegreeProgramController->register_routes();

Check failure on line 134 in src/Infrastructure/RestApi/RestApiModule.php

View workflow job for this annotation

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

MixedMethodCall

src/Infrastructure/RestApi/RestApiModule.php:134:53: MixedMethodCall: Cannot determine the type of $translatedDegreeProgramController when calling method register_routes (see https://psalm.dev/015)
}
);

Expand Down
Loading
Loading