Skip to content

Commit 5153f91

Browse files
committed
Remove unused imports and sort remaining ones.
1 parent 6c79e0d commit 5153f91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+94
-128
lines changed

webapp/src/Controller/API/AbstractApiController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Doctrine\ORM\EntityManagerInterface;
1111
use Doctrine\ORM\NonUniqueResultException;
1212
use Doctrine\ORM\QueryBuilder;
13-
use Exception;
1413
use FOS\RestBundle\Controller\AbstractFOSRestController;
1514
use Symfony\Component\HttpFoundation\Request;
1615
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;

webapp/src/Controller/API/AccessController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
use FOS\RestBundle\Controller\Annotations as Rest;
1010
use Nelmio\ApiDocBundle\Annotation\Model;
1111
use OpenApi\Attributes as OA;
12-
use Symfony\Component\Security\Http\Attribute\IsGranted;
1312
use Symfony\Component\HttpFoundation\Request;
13+
use Symfony\Component\Security\Http\Attribute\IsGranted;
1414

1515
#[Rest\Route('/contests/{cid}/access')]
1616
#[OA\Tag(name: 'Access')]

webapp/src/Controller/API/ClarificationController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use App\Entity\Clarification;
77
use App\Entity\Contest;
88
use App\Entity\ContestProblem;
9-
use App\Entity\Problem;
109
use App\Entity\Team;
1110
use App\Utils\Utils;
1211
use Doctrine\ORM\NonUniqueResultException;

webapp/src/Controller/API/ContestController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@
2929
use Psr\Log\LoggerInterface;
3030
use Symfony\Component\DependencyInjection\Attribute\Autowire;
3131
use Symfony\Component\ExpressionLanguage\Expression;
32-
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
33-
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
34-
use Symfony\Component\Security\Http\Attribute\IsGranted;
3532
use Symfony\Component\HttpFoundation\File\UploadedFile;
3633
use Symfony\Component\HttpFoundation\JsonResponse;
3734
use Symfony\Component\HttpFoundation\Request;
3835
use Symfony\Component\HttpFoundation\Response;
3936
use Symfony\Component\HttpFoundation\StreamedResponse;
37+
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
38+
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
4039
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
4140
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
4241
use Symfony\Component\HttpKernel\Exception\HttpException;
4342
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
4443
use Symfony\Component\HttpKernel\KernelInterface;
4544
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
45+
use Symfony\Component\Security\Http\Attribute\IsGranted;
4646
use Symfony\Component\Validator\Validator\ValidatorInterface;
4747
use Symfony\Component\Yaml\Yaml;
4848
use TypeError;

webapp/src/Controller/API/GeneralInfoController.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use App\DataTransferObject\ApiVersion;
88
use App\DataTransferObject\DomJudgeApiInfo;
99
use App\DataTransferObject\ExtendedContestStatus;
10-
use App\Entity\Contest;
1110
use App\Entity\User;
1211
use App\Service\CheckConfigService;
1312
use App\Service\ConfigurationService;
@@ -17,23 +16,22 @@
1716
use Doctrine\ORM\EntityManagerInterface;
1817
use Doctrine\ORM\NonUniqueResultException;
1918
use Doctrine\ORM\NoResultException;
20-
use Exception;
2119
use FOS\RestBundle\Controller\AbstractFOSRestController;
2220
use FOS\RestBundle\Controller\Annotations as Rest;
2321
use InvalidArgumentException;
2422
use JMS\Serializer\SerializerInterface;
2523
use Nelmio\ApiDocBundle\Annotation\Model;
2624
use OpenApi\Attributes as OA;
2725
use Psr\Log\LoggerInterface;
28-
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
29-
use Symfony\Component\Security\Http\Attribute\IsGranted;
3026
use Symfony\Component\HttpFoundation\JsonResponse;
3127
use Symfony\Component\HttpFoundation\Request;
3228
use Symfony\Component\HttpFoundation\Response;
29+
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
3330
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
3431
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
3532
use Symfony\Component\Intl\Countries;
3633
use Symfony\Component\Routing\RouterInterface;
34+
use Symfony\Component\Security\Http\Attribute\IsGranted;
3735

3836
#[OA\Tag(name: 'General')]
3937
#[OA\Parameter(ref: '#/components/parameters/strict')]

webapp/src/Controller/API/GroupController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
use FOS\RestBundle\Controller\Annotations as Rest;
1212
use Nelmio\ApiDocBundle\Annotation\Model;
1313
use OpenApi\Attributes as OA;
14-
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
15-
use Symfony\Component\Security\Http\Attribute\IsGranted;
1614
use Symfony\Component\HttpFoundation\Request;
1715
use Symfony\Component\HttpFoundation\Response;
16+
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
1817
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
18+
use Symfony\Component\Security\Http\Attribute\IsGranted;
1919

2020
/**
2121
* @extends AbstractRestController<TeamCategory, TeamCategory>

webapp/src/Controller/API/JudgehostController.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
use App\Utils\Utils;
3131
use BadMethodCallException;
3232
use Doctrine\DBAL\ArrayParameterType;
33-
use Doctrine\DBAL\Exception as DBALException;
3433
use Doctrine\DBAL\Exception;
34+
use Doctrine\DBAL\Exception as DBALException;
3535
use Doctrine\ORM\AbstractQuery;
3636
use Doctrine\ORM\EntityManager;
3737
use Doctrine\ORM\EntityManagerInterface;
38+
use Doctrine\ORM\Exception\ORMException;
3839
use Doctrine\ORM\NonUniqueResultException;
3940
use Doctrine\ORM\NoResultException;
40-
use Doctrine\ORM\Exception\ORMException;
4141
use Doctrine\ORM\Query;
4242
use Doctrine\ORM\Query\Expr\Join;
4343
use FOS\RestBundle\Controller\AbstractFOSRestController;
@@ -46,12 +46,12 @@
4646
use OpenApi\Attributes as OA;
4747
use Psr\Log\LoggerInterface;
4848
use Symfony\Component\ExpressionLanguage\Expression;
49-
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
50-
use Symfony\Component\HttpKernel\Exception\HttpException;
51-
use Symfony\Component\Security\Http\Attribute\IsGranted;
5249
use Symfony\Component\HttpFoundation\Request;
50+
use Symfony\Component\HttpKernel\Attribute\MapQueryParameter;
5351
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
52+
use Symfony\Component\HttpKernel\Exception\HttpException;
5453
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
54+
use Symfony\Component\Security\Http\Attribute\IsGranted;
5555

5656
#[Rest\Route('/judgehosts')]
5757
#[OA\Tag(name: 'Judgehosts')]

webapp/src/Controller/API/JudgementTypeController.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use App\DataTransferObject\JudgementType;
66
use Doctrine\ORM\NonUniqueResultException;
7-
use Doctrine\ORM\QueryBuilder;
8-
use Exception;
97
use FOS\RestBundle\Controller\Annotations as Rest;
108
use Nelmio\ApiDocBundle\Annotation\Model;
119
use OpenApi\Attributes as OA;

webapp/src/Controller/API/MetricsController.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@
33
namespace App\Controller\API;
44

55
use App\DataTransferObject\SubmissionRestriction;
6-
use App\Entity\Submission;
7-
use App\Service\DOMJudgeService;
8-
use App\Service\SubmissionService;
96
use App\Entity\Balloon;
107
use App\Entity\QueueTask;
8+
use App\Entity\Submission;
119
use App\Entity\Team;
1210
use App\Entity\User;
11+
use App\Service\DOMJudgeService;
12+
use App\Service\SubmissionService;
1313
use App\Utils\Utils;
1414
use Doctrine\ORM\EntityManagerInterface;
1515
use FOS\RestBundle\Controller\AbstractFOSRestController;
1616
use FOS\RestBundle\Controller\Annotations as Rest;
17-
use Symfony\Component\Security\Http\Attribute\IsGranted;
1817
use OpenApi\Attributes as OA;
19-
use Symfony\Component\HttpFoundation\Response;
20-
use Symfony\Component\Routing\Attribute\Route;
21-
2218
use Prometheus\CollectorRegistry;
2319
use Prometheus\RenderTextFormat;
20+
use Symfony\Component\HttpFoundation\Response;
21+
use Symfony\Component\Routing\Attribute\Route;
22+
use Symfony\Component\Security\Http\Attribute\IsGranted;
2423

2524
#[IsGranted('ROLE_API_READER')]
2625
#[Route(path: '/metrics')]

webapp/src/Controller/API/OrganizationController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
use FOS\RestBundle\Controller\Annotations as Rest;
1616
use Nelmio\ApiDocBundle\Annotation\Model;
1717
use OpenApi\Attributes as OA;
18-
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
19-
use Symfony\Component\Security\Http\Attribute\IsGranted;
2018
use Symfony\Component\HttpFoundation\File\UploadedFile;
2119
use Symfony\Component\HttpFoundation\JsonResponse;
2220
use Symfony\Component\HttpFoundation\Request;
2321
use Symfony\Component\HttpFoundation\Response;
22+
use Symfony\Component\HttpKernel\Attribute\MapRequestPayload;
2423
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
2524
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
25+
use Symfony\Component\Security\Http\Attribute\IsGranted;
2626
use Symfony\Component\Validator\Validator\ValidatorInterface;
2727

2828
/**

0 commit comments

Comments
 (0)