Lines 100.00% 4 / 4
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
Index 100.00% 4 / 4 100.00% 1 / 1 1 100.00% 1 / 1
 __invoke 100.00% 4 / 4 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Controller\Links;
6
7use App\Controller\BaseController;
8use App\LinkList\LinkListLoader;
9use Symfony\Component\HttpFoundation\Response;
10use Symfony\Component\Routing\Attribute\Route;
11
12/**
13 * The Ingress link list of docs/links.md, for everyone (as the app's Links screen).
14 */
15#[Route('/links', name: 'app_links', methods: ['GET'])]
16final class Index extends BaseController
17{
18    public const string SUGGEST_URL = 'https://github.com/elkuku/AgentTools/edit/master/docs/links.md';
19
20    public function __invoke(LinkListLoader $loader): Response
21    {
22        return $this->render('links/index.html.twig', [
23            'linkList' => $loader->load(),
24            'suggestUrl' => self::SUGGEST_URL,
25        ]);
26    }
27}