Skip to content

Commit aa33270

Browse files
Minor changes to DTO logic.
1 parent 7f0a45e commit aa33270

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

webapp/src/Controller/API/ProblemController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@ public function linkProblemAction(
295295
ContestProblemPut $contestProblemPut,
296296
Request $request,
297297
string $id
298-
): Response
299-
{
298+
): Response {
300299
$problem = $this->em->createQueryBuilder()
301300
->from(Problem::class, 'p')
302301
->select('p')

webapp/src/DataTransferObject/AddSubmission.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace App\DataTransferObject;
44

5-
65
use Nelmio\ApiDocBundle\Annotation\Model;
76
use OpenApi\Attributes as OA;
87
use Symfony\Component\Validator\Constraints as Assert;

webapp/src/Service/ImportExportService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ protected function importGroupsTsv(array $content, ?string &$message = null): in
647647
*/
648648
public function importGroupsJson(array $data, ?string &$message = null, ?array &$saved = null): int
649649
{
650+
// TODO: can we have this use the DTO?
650651
$groupData = [];
651652
foreach ($data as $group) {
652653
$groupData[] = [

webapp/tests/Unit/Controller/API/ContestControllerAdminTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ public function provideChangeTimes(): Generator
214214
// Note that if the first item contains "id", we replace it with the correct ID in the test
215215

216216
// General tests
217+
yield [[], 400, ''];
217218
yield [['dummy' => 'dummy'], 400, "This value should be of type unknown."];
218219
yield [['id' => 1], 400, 'Missing \"start_time\" or \"scoreboard_thaw_time\" in request.'];
219220
yield [['id' => 1, 'start_time' => null, 'scoreboard_thaw_time' => date('Y-m-d\TH:i:s', strtotime('+15 seconds'))], 400, 'Setting both \"start_time\" and \"scoreboard_thaw_time\" at the same time is not allowed.'];

0 commit comments

Comments
 (0)