X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=c9b4193f1a338ec9b851a795338720c4415e5e92;hb=9d31e46d0f4dc6d68ad38b09816bea2b447f8b50;hp=7f005fb7cd1635e60c21bfa764f5c53f637e487e;hpb=73cdc59ddad5a2e36bb65375979e7550b4338d33;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 7f005fb7cd..c9b4193f1a 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -332,7 +332,7 @@ class OutputPage extends ContextSource { * a OutputPage tied to that context. * @param IContextSource $context */ - function __construct( IContextSource $context ) { + public function __construct( IContextSource $context ) { $this->setContext( $context ); } @@ -385,8 +385,8 @@ class OutputPage extends ContextSource { * @param string $name Name of the meta tag * @param string $val Value of the meta tag */ - function addMeta( $name, $val ) { - array_push( $this->mMetatags, [ $name, $val ] ); + public function addMeta( $name, $val ) { + $this->mMetatags[] = [ $name, $val ]; } /** @@ -406,8 +406,8 @@ class OutputPage extends ContextSource { * * @param array $linkarr Associative array of attributes. */ - function addLink( array $linkarr ) { - array_push( $this->mLinktags, $linkarr ); + public function addLink( array $linkarr ) { + $this->mLinktags[] = $linkarr; } /** @@ -425,7 +425,7 @@ class OutputPage extends ContextSource { * in preference to addLink(), to avoid duplicate link tags. * @param string $url */ - function setCanonicalUrl( $url ) { + public function setCanonicalUrl( $url ) { $this->mCanonicalUrl = $url; } @@ -447,7 +447,7 @@ class OutputPage extends ContextSource { * * @param string $script Raw HTML */ - function addScript( $script ) { + public function addScript( $script ) { $this->mScripts .= $script; } @@ -621,7 +621,7 @@ class OutputPage extends ContextSource { * * @return array */ - function getHeadItemsArray() { + public function getHeadItemsArray() { return $this->mHeadItems; } @@ -1598,6 +1598,7 @@ class OutputPage extends ContextSource { * @param ParserOptions|null $options Either the ParserOption to use or null to only get the * current ParserOption object. This parameter is deprecated since 1.31. * @return ParserOptions + * @suppress PhanUndeclaredProperty For isBogus */ public function parserOptions( $options = null ) { if ( $options !== null ) { @@ -1954,7 +1955,7 @@ class OutputPage extends ContextSource { * @param ParserOutput $parserOutput * @param array $poOptions Options to ParserOutput::getText() */ - function addParserOutput( ParserOutput $parserOutput, $poOptions = [] ) { + public function addParserOutput( ParserOutput $parserOutput, $poOptions = [] ) { $this->addParserOutputMetadata( $parserOutput ); $this->addParserOutputText( $parserOutput, $poOptions ); } @@ -2188,7 +2189,7 @@ class OutputPage extends ContextSource { * * @return array */ - function getCacheVaryCookies() { + public function getCacheVaryCookies() { if ( self::$cacheVaryCookies === null ) { $config = $this->getConfig(); self::$cacheVaryCookies = array_values( array_unique( array_merge( @@ -2209,7 +2210,7 @@ class OutputPage extends ContextSource { * * @return bool */ - function haveCacheVaryCookies() { + public function haveCacheVaryCookies() { $request = $this->getRequest(); foreach ( $this->getCacheVaryCookies() as $cookieName ) { if ( $request->getCookie( $cookieName, '', '' ) !== '' ) { @@ -2822,7 +2823,7 @@ class OutputPage extends ContextSource { /** * Add a "return to" link pointing to a specified title * - * @param Title $title Title to link + * @param LinkTarget $title Title to link * @param array $query Query string parameters * @param string|null $text Text of the link (input is not escaped) * @param array $options Options array to pass to Linker