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 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace App\Controller\Links; | |
| 6 | ||
| 7 | use App\Controller\BaseController; | |
| 8 | use App\LinkList\LinkListLoader; | |
| 9 | use Symfony\Component\HttpFoundation\Response; | |
| 10 | use 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'])] | |
| 16 | final 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 | } |