From 0cbd9ab9f939c773e90f28d54f6106c2e372280d Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 11 Jan 2024 14:06:14 +1300 Subject: [PATCH] ENH Add generic types --- src/ErrorPageController.php | 3 ++- src/ErrorPageControllerExtension.php | 4 +++- src/ErrorPageFileExtension.php | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ErrorPageController.php b/src/ErrorPageController.php index 80b6f58..fc4a753 100644 --- a/src/ErrorPageController.php +++ b/src/ErrorPageController.php @@ -8,6 +8,8 @@ /** * Controller for ErrorPages. + * + * @extends PageController */ class ErrorPageController extends PageController { @@ -30,7 +32,6 @@ protected function init() */ public function handleRequest(HTTPRequest $request): HTTPResponse { - /** @var ErrorPage $page */ $page = $this->data(); $response = parent::handleRequest($request); $response->setStatusCode($page->ErrorCode); diff --git a/src/ErrorPageControllerExtension.php b/src/ErrorPageControllerExtension.php index cd95af8..d2ccc2f 100644 --- a/src/ErrorPageControllerExtension.php +++ b/src/ErrorPageControllerExtension.php @@ -9,13 +9,15 @@ use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse_Exception; use SilverStripe\Core\Extension; +use SilverStripe\Forms\Form; /** * Enhances error handling for a controller with ErrorPage generated output + * + * @extends Extension */ class ErrorPageControllerExtension extends Extension { - /** * Used by {@see RequestHandler::httpError} * diff --git a/src/ErrorPageFileExtension.php b/src/ErrorPageFileExtension.php index 0880eed..e30747a 100644 --- a/src/ErrorPageFileExtension.php +++ b/src/ErrorPageFileExtension.php @@ -2,15 +2,17 @@ namespace SilverStripe\ErrorPage; +use SilverStripe\Assets\Shortcodes\FileShortcodeProvider; use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\DataObject; /** * Decorates {@see File} with ErrorPage support + * + * @extends DataExtension */ class ErrorPageFileExtension extends DataExtension { - /** * Used by {@see File::handle_shortcode} *