Skip to content

Commit 7a2deca

Browse files
committed
Check is removed as the DTO checks this
We had this before the DTO, PHPstan correctly flags this as a variable which can never be . So we either had to add this null to keep PHPstan wondering or accept that when someone alters the database they get problems.
1 parent ed8f760 commit 7a2deca

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

webapp/src/Entity/Contest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,14 +1340,6 @@ public function validate(ExecutionContextInterface $context): void
13401340
}
13411341

13421342
if ($this->medalsEnabled) {
1343-
foreach (['goldMedals', 'silverMedals', 'bronzeMedals'] as $field) {
1344-
if ($this->$field === null) {
1345-
$context
1346-
->buildViolation('This field is required when \'Enable medals\' is set.')
1347-
->atPath($field)
1348-
->addViolation();
1349-
}
1350-
}
13511343
if ($this->medal_categories->isEmpty()) {
13521344
$context
13531345
->buildViolation('This field is required when \'Process medals\' is set.')

0 commit comments

Comments
 (0)