From fcb4c01728af97b5c8da97eaaad0a0a2d3fde5b1 Mon Sep 17 00:00:00 2001 From: Eric Pfeiffer Date: Tue, 30 Nov 2021 14:50:33 -0600 Subject: [PATCH] Fix return type hints for CMS Page and Controller. --- modules/cms/classes/Controller.php | 4 ++-- modules/cms/classes/Page.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/cms/classes/Controller.php b/modules/cms/classes/Controller.php index cd6c1bf8f3..f982b65024 100644 --- a/modules/cms/classes/Controller.php +++ b/modules/cms/classes/Controller.php @@ -1336,7 +1336,7 @@ public function getLayout() * @param mixed $name Specifies the Cms Page file name. * @param array $parameters Route parameters to consider in the URL. * @param bool $routePersistence By default the existing routing parameters will be included - * @return string + * @return string|null */ public function pageUrl($name, $parameters = [], $routePersistence = true) { @@ -1519,7 +1519,7 @@ public function findComponentByHandler($handler) /** * Searches the layout and page components by a partial file * @param string $partial - * @return ComponentBase The component object, if found + * @return ComponentBase|null The component object, if found */ public function findComponentByPartial($partial) { diff --git a/modules/cms/classes/Page.php b/modules/cms/classes/Page.php index 4186fd58a4..610030f6b3 100644 --- a/modules/cms/classes/Page.php +++ b/modules/cms/classes/Page.php @@ -117,7 +117,7 @@ public static function getNameList() * Helper that makes a URL for a page in the active theme. * @param mixed $page Specifies the Cms Page file name. * @param array $params Route parameters to consider in the URL. - * @return string + * @return string|null */ public static function url($page, array $params = []) {