Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| SiteController | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| index | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Presentation\Web; |
| 6 | |
| 7 | use Nyholm\Psr7\Response; |
| 8 | use Psr\Http\Message\ResponseInterface; |
| 9 | |
| 10 | final class SiteController |
| 11 | { |
| 12 | public function index(): ResponseInterface |
| 13 | { |
| 14 | $html = <<<'HTML' |
| 15 | <!DOCTYPE html> |
| 16 | <html lang="pl"> |
| 17 | <head> |
| 18 | <meta charset="UTF-8"> |
| 19 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 20 | <title>Ammonly App-Admin</title> |
| 21 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"> |
| 22 | </head> |
| 23 | <body class="bg-dark text-light min-vh-100 d-flex flex-column justify-content-center align-items-center"> |
| 24 | <main class="container text-center p-4"> |
| 25 | <div class="card bg-dark border border-secondary text-light p-5 shadow-lg mx-auto"> |
| 26 | <h1 class="display-5 fw-bold text-white mb-3">Ammonly App-Admin</h1> |
| 27 | <p class="lead text-secondary mb-4"> |
| 28 | Nowoczesna aplikacja administracyjna oparta o Yii3, Twig, HTMX i Bootstrap. |
| 29 | </p> |
| 30 | <div class="d-flex justify-content-center gap-3"> |
| 31 | <a href="https://doc.ammonly.com" target="_blank" class="btn btn-outline-light px-4"> |
| 32 | Dokumentacja |
| 33 | </a> |
| 34 | <a href="https://coverage.ammonly.com/admin/" target="_blank" class="btn btn-primary px-4"> |
| 35 | Coverage |
| 36 | </a> |
| 37 | <a href="https://sonar.ammonly.com" target="_blank" class="btn btn-info px-4"> |
| 38 | SonarQube |
| 39 | </a> |
| 40 | </div> |
| 41 | </div> |
| 42 | </main> |
| 43 | </body> |
| 44 | </html> |
| 45 | HTML; |
| 46 | |
| 47 | return new Response(200, ['Content-Type' => 'text/html; charset=utf-8'], $html); |
| 48 | } |
| 49 | } |