diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2025-12-24 13:15:40 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2025-12-24 13:15:40 +0000 |
| commit | 9f91568f2fcb7b00bc1905f576ad6fa871bf749e (patch) | |
| tree | 0a4a261994946330c1b1f26dbe8874fde4a57493 /app/Http/RequestHandlers/RobotsTxt.php | |
| parent | b477f3177bfa02cd9fa87032e176f6773b0c8ef8 (diff) | |
| download | webtrees-9f91568f2fcb7b00bc1905f576ad6fa871bf749e.tar.gz webtrees-9f91568f2fcb7b00bc1905f576ad6fa871bf749e.tar.bz2 webtrees-9f91568f2fcb7b00bc1905f576ad6fa871bf749e.zip | |
CodeStyle
Diffstat (limited to 'app/Http/RequestHandlers/RobotsTxt.php')
| -rw-r--r-- | app/Http/RequestHandlers/RobotsTxt.php | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/app/Http/RequestHandlers/RobotsTxt.php b/app/Http/RequestHandlers/RobotsTxt.php index c19fc7cda9..316274c038 100644 --- a/app/Http/RequestHandlers/RobotsTxt.php +++ b/app/Http/RequestHandlers/RobotsTxt.php @@ -33,12 +33,7 @@ use function response; use const PHP_URL_PATH; -/** - * Generate a robots exclusion file. - * - * @link https://robotstxt.org - */ -class RobotsTxt implements RequestHandlerInterface +final class RobotsTxt implements RequestHandlerInterface { private const array DISALLOWED_PATHS = [ 'admin', @@ -48,14 +43,10 @@ class RobotsTxt implements RequestHandlerInterface 'account', ]; - private ModuleService $module_service; - - private TreeService $tree_service; - - public function __construct(ModuleService $module_service, TreeService $tree_service) - { - $this->module_service = $module_service; - $this->tree_service = $tree_service; + public function __construct( + private readonly ModuleService $module_service, + private readonly TreeService $tree_service, + ) { } public function handle(ServerRequestInterface $request): ResponseInterface |
