fixed some backend tests #3057
main.yml
on: push
Coding Guidelines Check
17s
FE Asset Linting
21s
FE asset formatting check
19s
PHPMD
10s
Static Code Analysis
35s
Run frontend type check
29s
Run frontend unit- and functional-tests
54s
Matrix: Run E2E-tests via Cypress
Annotations
12 errors and 7 warnings
PHPMD
Process completed with exit code 2.
|
Coding Guidelines Check
Process completed with exit code 8.
|
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, dayId: int|null, 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, dayId) (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, dayId: int|null, 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, dayId) (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)
|
UndefinedDocblockClass:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L94
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:94:38: UndefinedDocblockClass: Docblock-defined class, interface or enum named App\Mealz\MealBundle\Message\Event does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L95
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:95:21: UndefinedDocblockClass: Docblock-defined class, interface or enum named App\Mealz\MealBundle\Message\Event does not exist (see https://psalm.dev/200)
|
UndefinedDocblockClass:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L95
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:95:55: UndefinedDocblockClass: Docblock-defined class, interface or enum named App\Mealz\MealBundle\Message\Event does not exist (see https://psalm.dev/200)
|
InvalidArrayOffset:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L140
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:140:13: InvalidArrayOffset: Cannot access value on variable $result[$eventTitle] using a list<string> offset, expecting array-key (see https://psalm.dev/115)
|
InvalidOperand:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L140
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:140:43: InvalidOperand: Cannot concatenate with a list<string> (see https://psalm.dev/058)
|
InvalidArgument:
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php#L143
src/Mealz/MealBundle/Message/WeeklyMenuMessage.php:143:30: InvalidArgument: Argument 2 of implode expects array<array-key, null|object{__tostring()}|scalar>, but array<array-key|list<string>, non-falsy-string> provided (see https://psalm.dev/004)
|
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#L312
Avoid excessively long variable names like $eventExistsForDayAlready. Keep variable name length under 20.
|
PHPMD:
src/Mealz/MealBundle/Controller/MealAdminController.php#L315
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/MealBundle/Message/WeeklyMenuMessage.php#L72
The method getDishesByDay() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
|
PHPMD:
src/Mealz/UserBundle/DataFixtures/ORM/LoadUsers.php#L124
Avoid unused parameters such as '$email'.
|