diff --git a/includes/CategoryTree.php b/includes/CategoryTree.php index 90c6a10c..077a938a 100644 --- a/includes/CategoryTree.php +++ b/includes/CategoryTree.php @@ -294,7 +294,7 @@ class CategoryTree { * Returns a string with a HTML represenation of the given page. * $info must be an associative array, containing at least a Title object under the 'title' key. */ - public function renderNodeInfo( Title $title, Category $cat = null, int $children = 0 ): string { + public function renderNodeInfo( Title $title, ?Category $cat = null, int $children = 0 ): string { $mode = $this->optionManager->getOption( 'mode' ); $isInCatNS = $title->inNamespace( NS_CATEGORY ); diff --git a/includes/Hooks.php b/includes/Hooks.php index 737964a5..805ccf4a 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -190,8 +190,8 @@ class Hooks implements public function parserHook( $cat, array $argv, - Parser $parser = null, - PPFrame $frame = null + ?Parser $parser = null, + ?PPFrame $frame = null ) { if ( $parser ) { $parserOutput = $parser->getOutput(); diff --git a/includes/OptionManager.php b/includes/OptionManager.php index 7416e23c..97eafa02 100644 --- a/includes/OptionManager.php +++ b/includes/OptionManager.php @@ -260,7 +260,7 @@ class OptionManager { * @param int|null $depth * @return string */ - public function getOptionsAsCacheKey( int $depth = null ): string { + public function getOptionsAsCacheKey( ?int $depth = null ): string { $key = ''; foreach ( $this->mOptions as $k => $v ) { @@ -280,7 +280,7 @@ class OptionManager { * @param int|null $depth * @return mixed */ - public function getOptionsAsJsStructure( int $depth = null ) { + public function getOptionsAsJsStructure( ?int $depth = null ) { $opt = $this->mOptions; if ( $depth !== null ) { $opt['depth'] = $depth;