• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

systemsdk / docker-symfony-api / #74

pending completion
#74

push

DKravtsov
Php 8.2, symfony 6.2, updated RabbitMQ, updated composer dependencies, refactoring.

51 of 51 new or added lines in 44 files covered. (100.0%)

1479 of 2668 relevant lines covered (55.43%)

23.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Tool/Transport/Controller/Api/v1/Localization/TimeZoneController.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Tool\Transport\Controller\Api\v1\Localization;
6

7
use App\Tool\Application\Service\LocalizationService;
8
use OpenApi\Annotations as OA;
9
use Symfony\Component\HttpFoundation\JsonResponse;
10
use Symfony\Component\HttpFoundation\Request;
11
use Symfony\Component\Routing\Annotation\Route;
12
use Throwable;
13

14
/**
15
 * Class TimezoneController
16
 *
17
 * @OA\Get(security={})
18
 *
19
 * @OA\Tag(name="Localization")
20
 *
21
 * @package App\Tool
22
 */
23
class TimeZoneController
24
{
25
    public function __construct(
26
        private readonly LocalizationService $localization,
27
    ) {
28
    }
×
29

30
    /**
31
     * Endpoint action to get list of supported timezones. This is for use to
32
     * choose what timezone your frontend application can use within its date,
33
     * time, datetime, etc. formatting.
34
     *
35
     * @OA\Response(
36
     *     response=200,
37
     *     description="List of timezone objects.",
38
     *     @OA\JsonContent(
39
     *         type="array",
40
     *         @OA\Items(
41
     *             type="object",
42
     *             @OA\Property(
43
     *                 property="timezone",
44
     *                 type="string",
45
     *                 example="Europe",
46
     *                 description="Africa,America,Antarctica,Arctic,Asia,Atlantic,Australia,Europe,Indian,Pacific,UTC."
47
     *             ),
48
     *             @OA\Property(
49
     *                 property="identier",
50
     *                 type="string",
51
     *                 example="Europe/Kyiv",
52
     *                 description="Timezone identifier that you can use with other librariers."
53
     *             ),
54
     *             @OA\Property(
55
     *                 property="offset",
56
     *                 type="string",
57
     *                 example="GMT+2:00",
58
     *                 description="GMT offset of identifier."
59
     *             ),
60
     *             @OA\Property(
61
     *                 property="value",
62
     *                 type="string",
63
     *                 example="Europe/Kyiv",
64
     *                 description="User friendly value of identifier value eg. '_' characters are replaced by space."
65
     *             ),
66
     *         ),
67
     *     ),
68
     * )
69
     *
70
     * @throws Throwable
71
     */
72
    #[Route(
73
        path: '/v1/localization/timezone',
74
        methods: [Request::METHOD_GET],
75
    )]
76
    public function __invoke(): JsonResponse
77
    {
78
        return new JsonResponse($this->localization->getTimezones());
×
79
    }
80
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc