diff --git a/system/src/Grav/Common/Flex/Types/Pages/PageObject.php b/system/src/Grav/Common/Flex/Types/Pages/PageObject.php index 143a4ab4b..2ff5ed8d2 100644 --- a/system/src/Grav/Common/Flex/Types/Pages/PageObject.php +++ b/system/src/Grav/Common/Flex/Types/Pages/PageObject.php @@ -641,8 +641,7 @@ class PageObject extends FlexPageObject return $this->root ?: parent::exists(); } - // TODO: Disabled because this slows down exception handling on missing Twig template files - /* * + /** * @return array * / public function __debugInfo(): array @@ -654,7 +653,6 @@ class PageObject extends FlexPageObject '_content:private' => $this->getRawContent() ]; } - */ /** * @param array $elements diff --git a/system/src/Grav/Common/Page/Interfaces/PageContentInterface.php b/system/src/Grav/Common/Page/Interfaces/PageContentInterface.php index 30db89d66..69bf8bf0d 100644 --- a/system/src/Grav/Common/Page/Interfaces/PageContentInterface.php +++ b/system/src/Grav/Common/Page/Interfaces/PageContentInterface.php @@ -11,6 +11,7 @@ namespace Grav\Common\Page\Interfaces; use Grav\Common\Data\Blueprint; use Grav\Common\Media\Interfaces\MediaCollectionInterface; +use Grav\Common\Page\Header; /** * Methods currently implemented in Flex Page emulation layer. @@ -21,7 +22,7 @@ interface PageContentInterface * Gets and Sets the header based on the YAML configuration at the top of the .md file * * @param object|array|null $var a YAML object representing the configuration for the file - * @return object the current YAML configuration + * @return \stdClass|Header The current YAML configuration */ public function header($var = null); diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 992926248..31dfe1ffd 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -388,7 +388,7 @@ class Page implements PageInterface * Gets and Sets the header based on the YAML configuration at the top of the .md file * * @param object|array|null $var a YAML object representing the configuration for the file - * @return object the current YAML configuration + * @return \stdClass the current YAML configuration */ public function header($var = null) { diff --git a/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php b/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php index c3bbb405e..bbf5e1b04 100644 --- a/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php +++ b/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php @@ -100,6 +100,7 @@ trait PageContentTrait /** * @inheritdoc + * @return Header */ public function header($var = null) { diff --git a/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php b/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php index dfbc5b737..d34b39144 100644 --- a/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php +++ b/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php @@ -286,8 +286,7 @@ trait FlexMediaTrait $this->clearMediaCache(); } - // TODO: Disabled because this slows down exception handling on missing Twig template files - /* * + /** * @return array * / #[\ReturnTypeWillChange] @@ -297,7 +296,6 @@ trait FlexMediaTrait 'uploads:private' => $this->getUpdatedMedia() ]; } - */ /** * @param array $files diff --git a/tests/phpstan/plugins.neon b/tests/phpstan/plugins.neon index d6d037a21..82570cca5 100644 --- a/tests/phpstan/plugins.neon +++ b/tests/phpstan/plugins.neon @@ -38,6 +38,7 @@ parameters: - Grav\Common\GPM\Common\Package - Grav\Common\GPM\Local\Package - Grav\Common\GPM\Remote\Package + - Grav\Common\Page\Header - Grav\Common\Session - Gantry\Component\Config\Config dynamicConstantNames: