Skip to content

added second event to the edit week site in the frontend, second even… #3032

added second event to the edit week site in the frontend, second even…

added second event to the edit week site in the frontend, second even… #3032

Triggered via push August 26, 2024 11:55
Status Failure
Total duration 1m 7s
Artifacts

main.yml

on: push
Coding Guidelines Check
11s
Coding Guidelines Check
FE Asset Linting
17s
FE Asset Linting
FE asset formatting check
18s
FE asset formatting check
PHPMD
8s
PHPMD
Static Code Analysis
29s
Static Code Analysis
Run frontend type check
25s
Run frontend type check
Run frontend unit- and functional-tests
53s
Run frontend unit- and functional-tests
Build Development Docker Images
0s
Build Development Docker Images
Build Docker Images
0s
Build Docker Images
Matrix: 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

29 errors and 6 warnings
PHPMD
Process completed with exit code 2.
Coding Guidelines Check
Process completed with exit code 8.
FE asset formatting check
Process completed with exit code 1.
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Cannot find name 'getEventById'.
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Cannot find name 'getEventById'.
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
Run frontend type check
Property 'event' does not exist on type 'DayDTO'. Did you mean 'events'?
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#L178
src/Mealz/MealBundle/Entity/Day.php:178: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#L202
src/Mealz/MealBundle/Entity/Day.php:202: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)
tests/unit/menu/MenuDay.spec.ts > Test MenuDay > should render MenuDay: src/Resources/src/components/menu/MenuDay.vue#L200
ReferenceError: getEventById is not defined ❯ src/components/menu/MenuDay.vue:200:3 ❯ node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:1546:40 ❯ callWithErrorHandling node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:203:19 ❯ callWithAsyncErrorHandling node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:210:17 ❯ hook.__weh.hook.__weh node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:1526:19 ❯ flushPostFlushCbs node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:385:32 ❯ render node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5600:7 ❯ mount node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:2644:13 ❯ Object.app.mount node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:1463:19 ❯ Proxy.mount node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:8415:18
tests/unit/stores/dashboardStore.spec.ts > Test dashboardStore > should update the participation count of an event: src/Resources/tests/unit/stores/dashboardStore.spec.ts#L96
TypeError: Cannot read properties of undefined (reading 'participations') ❯ tests/unit/stores/dashboardStore.spec.ts:96:53
tests/unit/stores/eventsStore.spec.ts > Test EventsStore > should filter the state after setting a filterString: src/Resources/tests/unit/stores/eventsStore.spec.ts#L108
AssertionError: expected { id: 49, …(3) } to deeply equal { id: 48, …(3) } - Expected + Received Object { - "id": 48, + "id": 49, "public": true, "slug": "alumni-afterwork", "title": "Alumni Afterwork", } ❯ tests/unit/stores/eventsStore.spec.ts:108:41
tests/unit/stores/eventsStore.spec.ts > Test EventsStore > should fetch all the users that participate in an event and return a list of their names: src/Resources/src/stores/eventsStore.ts#L233
TypeError: Cannot read properties of undefined (reading 'id') ❯ getEventIdBySlug src/stores/eventsStore.ts:233:70 ❯ getParticipantsForEvent src/stores/eventsStore.ts:201:70 ❯ tests/unit/stores/eventsStore.spec.ts:156:29
tests/unit/stores/weeksStore.spec.ts > Test weeksStore > should return the right menuday for a given weekId and dayId: src/Resources/src/stores/weeksStore.ts#L260
TypeError: Cannot convert undefined or null to object ❯ getMenuDay src/stores/weeksStore.ts:260:47 ❯ tests/unit/stores/weeksStore.spec.ts:98:25
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 60 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#L315
Avoid excessively long variable names like $eventExistsForDayAlready. Keep variable name length under 20.
PHPMD: src/Mealz/MealBundle/Controller/MealAdminController.php#L318
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'.