Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| PrivacyController | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| index | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Privacy Controller |
| 5 | * |
| 6 | * This Source Code Form is subject to the terms of the Mozilla Public License, |
| 7 | * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
| 8 | * obtain one at https://mozilla.org/MPL/2.0/. |
| 9 | * |
| 10 | * @package phpMyFAQ |
| 11 | * @author Thorsten Rinne <thorsten@phpmyfaq.de> |
| 12 | * @copyright 2023-2026 phpMyFAQ Team |
| 13 | * @license https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 14 | * @link https://www.phpmyfaq.de |
| 15 | * @since 2023-01-22 |
| 16 | */ |
| 17 | |
| 18 | declare(strict_types=1); |
| 19 | |
| 20 | namespace phpMyFAQ\Controller\Frontend; |
| 21 | |
| 22 | use Symfony\Component\HttpFoundation\Request; |
| 23 | use Symfony\Component\HttpFoundation\Response; |
| 24 | use Symfony\Component\Routing\Attribute\Route; |
| 25 | |
| 26 | final class PrivacyController extends AbstractFrontController |
| 27 | { |
| 28 | /** |
| 29 | * Displays the privacy page - either a custom page or redirects to configured URL. |
| 30 | * @throws \Exception |
| 31 | */ |
| 32 | #[Route(path: '/privacy.html', name: 'public.privacy', methods: ['GET'])] |
| 33 | public function index(Request $request): Response |
| 34 | { |
| 35 | return $this->handleStaticPageRedirect('main.privacyURL'); |
| 36 | } |
| 37 | } |