Skip to content

event is input into the database, just one event at a time works at t… #2940

event is input into the database, just one event at a time works at t…

event is input into the database, just one event at a time works at t… #2940

Triggered via push July 31, 2024 14:04
Status Failure
Total duration 52s
Artifacts

main.yml

on: push
Coding Guidelines Check
11s
Coding Guidelines Check
FE Asset Linting
18s
FE Asset Linting
FE asset formatting check
17s
FE asset formatting check
PHPMD
10s
PHPMD
Static Code Analysis
32s
Static Code Analysis
Run frontend unit- and functional-tests
39s
Run frontend unit- and functional-tests
Build Docker Images
0s
Build Docker Images
Run E2E-tests via Cypress
0s
Run E2E-tests via Cypress
Run backend unit- and functional-tests
0s
Run backend unit- and functional-tests
Publish
0s
Publish
Scan vulnerabilities
0s
Scan vulnerabilities
Deploy and notify
0s
Deploy and notify
Fit to window
Zoom out
Zoom in

Annotations

14 errors and 6 warnings
PHPMD
Process completed with exit code 2.
Coding Guidelines Check
Process completed with exit code 72.
FE asset formatting check
Process completed with exit code 1.
TooFewArguments: src/Mealz/MealBundle/Controller/MealGuestController.php#L104
src/Mealz/MealBundle/Controller/MealGuestController.php:104:47: TooFewArguments: Too few arguments for App\Mealz\MealBundle\Entity\Day::getEvent - expecting day to be passed (see https://psalm.dev/025)
TooFewArguments: src/Mealz/MealBundle/Controller/MealGuestController.php#L104
src/Mealz/MealBundle/Controller/MealGuestController.php:104:47: TooFewArguments: Too few arguments for App\Mealz\MealBundle\Entity\Day::getEvent - expecting id to be passed (see https://psalm.dev/025)
TooFewArguments: src/Mealz/MealBundle/Controller/MealGuestController.php#L104
src/Mealz/MealBundle/Controller/MealGuestController.php:104:47: TooFewArguments: Too few arguments for method App\Mealz\MealBundle\Entity\Day::getevent saw 0 (see https://psalm.dev/025)
TooFewArguments: src/Mealz/MealBundle/Controller/MealGuestController.php#L130
src/Mealz/MealBundle/Controller/MealGuestController.php:130:56: TooFewArguments: Too few arguments for App\Mealz\MealBundle\Service\EventParticipationService::joinAsGuest - expecting eventId to be passed (see https://psalm.dev/025)
TooFewArguments: src/Mealz/MealBundle/Controller/MealGuestController.php#L130
src/Mealz/MealBundle/Controller/MealGuestController.php:130:56: TooFewArguments: Too few arguments for method App\Mealz\MealBundle\Service\EventParticipationService::joinasguest saw 4 (see https://psalm.dev/025)
InvalidReturnType: src/Mealz/MealBundle/Entity/Day.php#L174
src/Mealz/MealBundle/Entity/Day.php:174:22: InvalidReturnType: The declared return type 'array{dateTime: DateTime, enabled: bool, event: int|null, lockParticipationDateTime: DateTime, meals: array<''|int, non-empty-list<array<array-key, mixed>>>, week: int|null}' for App\Mealz\MealBundle\Entity\Day::jsonSerialize is incorrect, got 'array{dateTime: DateTime, enabled: bool, events: array<int, array<array-key, mixed>>, lockParticipationDateTime: DateTime, meals: array<''|int, non-empty-list<array{dateTime: DateTime, day: int|null, dish: null|string, id: int|null, lockTime: DateTime, participationLimit: int}>>, week: int|null}' which is different due to additional array shape fields (events) (see https://psalm.dev/011)
InvalidReturnStatement: src/Mealz/MealBundle/Entity/Day.php#L198
src/Mealz/MealBundle/Entity/Day.php:198:16: InvalidReturnStatement: The inferred type 'array{dateTime: DateTime, enabled: bool, events: array<int, array<array-key, mixed>>, lockParticipationDateTime: DateTime, meals: array<''|int, non-empty-list<array{dateTime: DateTime, day: int|null, dish: null|string, id: int|null, lockTime: DateTime, participationLimit: int}>>, week: int|null}' does not match the declared return type 'array{dateTime: DateTime, enabled: bool, event: int|null, lockParticipationDateTime: DateTime, meals: array<''|int, non-empty-list<array<array-key, mixed>>>, week: int|null}' for App\Mealz\MealBundle\Entity\Day::jsonSerialize due to additional array shape fields (events) (see https://psalm.dev/128)
InvalidNullableReturnType: src/Mealz/MealBundle/Helper/MealAdminHelper.php#L34
src/Mealz/MealBundle/Helper/MealAdminHelper.php:34:46: InvalidNullableReturnType: The declared return type 'App\Mealz\MealBundle\Entity\Event' for App\Mealz\MealBundle\Helper\MealAdminHelper::findEvent is not nullable, but 'App\Mealz\MealBundle\Entity\Event|null' contains null (see https://psalm.dev/144)
NullableReturnStatement: src/Mealz/MealBundle/Helper/MealAdminHelper.php#L36
src/Mealz/MealBundle/Helper/MealAdminHelper.php:36:16: NullableReturnStatement: The declared return type 'App\Mealz\MealBundle\Entity\Event' for App\Mealz\MealBundle\Helper\MealAdminHelper::findEvent is not nullable, but the function returns 'App\Mealz\MealBundle\Entity\Event|null' (see https://psalm.dev/139)
InvalidArgument: src/Mealz/MealBundle/Service/ApiService.php#L127
src/Mealz/MealBundle/Service/ApiService.php:127:69: InvalidArgument: Argument 2 of App\Mealz\MealBundle\Service\EventParticipationService::getEventParticipationData expects int|null, but App\Mealz\UserBundle\Entity\Profile|null provided (see https://psalm.dev/004)
Run frontend unit- and functional-tests
Process completed with exit code 1.
PHPMD: src/Mealz/MealBundle/Controller/MealAdminController.php#L32
The class MealAdminController has an overall complexity of 57 which is very high. The configured complexity threshold is 55.
PHPMD: src/Mealz/MealBundle/Controller/MealAdminController.php#L34
The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10.
PHPMD: src/Mealz/MealBundle/Controller/MealAdminController.php#L299
Avoid excessively long variable names like $eventExistsForDayAlready. Keep variable name length under 20.
PHPMD: src/Mealz/MealBundle/Controller/MealAdminController.php#L301
Avoid excessively long variable names like $eventParticipationEntity. Keep variable name length under 20.
PHPMD: src/Mealz/MealBundle/Helper/MealAdminHelper.php#L19
Avoid excessively long variable names like $eventParticipationRepository. Keep variable name length under 20.
PHPMD: src/Mealz/UserBundle/DataFixtures/ORM/LoadUsers.php#L124
Avoid unused parameters such as '$email'.