• 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/LanguageController.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

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

29
    /**
30
     * Endpoint action to get supported languages. This is for use to choose
31
     * what language your frontend application can use within its translations.
32
     *
33
     * @OA\Response(
34
     *      response=200,
35
     *      description="List of language strings.",
36
     *      @OA\JsonContent(
37
     *          type="array",
38
     *          example={"en","ru","fi"},
39
     *          @OA\Items(type="string"),
40
     *      ),
41
     *  )
42
     */
43
    #[Route(
44
        path: '/v1/localization/language',
45
        methods: [Request::METHOD_GET],
46
    )]
47
    public function __invoke(): JsonResponse
48
    {
49
        return new JsonResponse($this->localization->getLanguages());
×
50
    }
51
}
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