Withoutaname has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/148590

Change subject: Enforce array type hinting in OutputPage.php
......................................................................

Enforce array type hinting in OutputPage.php

Change-Id: I2b37a95e517e120471c709823ea319f60165be0e
---
M includes/OutputPage.php
1 file changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/148590/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 19b2240..0c49b72 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -369,7 +369,7 @@
         *
         * @param array $linkarr associative array of attributes.
         */
-       function addLink( $linkarr ) {
+       function addLink( array $linkarr ) {
                array_push( $this->mLinktags, $linkarr );
        }
 
@@ -380,7 +380,7 @@
         *                 values, both keys and values will be escaped, and the
         *                 "rel" attribute will be automatically added
         */
-       function addMetadataLink( $linkarr ) {
+       function addMetadataLink( array $linkarr ) {
                $linkarr['rel'] = $this->getMetadataAttribute();
                $this->addLink( $linkarr );
        }
@@ -488,7 +488,7 @@
         * @param string $type
         * @return array
         */
-       protected function filterModules( $modules, $position = null,
+       protected function filterModules( array $modules, $position = null,
                $type = ResourceLoaderModule::TYPE_COMBINED
        ) {
                $resourceLoader = $this->getResourceLoader();
@@ -1209,7 +1209,7 @@
         * @param array $newLinkArray Associative array mapping language code 
to the page
         *                      name
         */
-       public function addLanguageLinks( $newLinkArray ) {
+       public function addLanguageLinks( array $newLinkArray ) {
                $this->mLanguageLinks += $newLinkArray;
        }
 
@@ -1219,7 +1219,7 @@
         * @param array $newLinkArray Associative array mapping language code 
to the page
         *                      name
         */
-       public function setLanguageLinks( $newLinkArray ) {
+       public function setLanguageLinks( array $newLinkArray ) {
                $this->mLanguageLinks = $newLinkArray;
        }
 
@@ -1237,7 +1237,7 @@
         *
         * @param array $categories mapping category name => sort key
         */
-       public function addCategoryLinks( $categories ) {
+       public function addCategoryLinks( array $categories ) {
                global $wgContLang;
 
                if ( !is_array( $categories ) || count( $categories ) == 0 ) {
@@ -1305,7 +1305,7 @@
         *
         * @param array $categories mapping category name => sort key
         */
-       public function setCategoryLinks( $categories ) {
+       public function setCategoryLinks( array $categories ) {
                $this->mCategoryLinks = array();
                $this->addCategoryLinks( $categories );
        }
@@ -1403,7 +1403,7 @@
         * @param array $attribs
         * @param string $contents
         */
-       public function addElement( $element, $attribs = array(), $contents = 
'' ) {
+       public function addElement( $element, array $attribs = array(), 
$contents = '' ) {
                $this->addHTML( Html::element( $element, $attribs, $contents ) 
);
        }
 
@@ -2252,7 +2252,7 @@
         * @param array $errors error message keys
         * @param string $action action that was denied or null if unknown
         */
-       public function showPermissionsErrorPage( $errors, $action = null ) {
+       public function showPermissionsErrorPage( array $errors, $action = null 
) {
                // For some action (read, edit, create and upload), display a 
"login to do this action"
                // error if all of the following conditions are met:
                // 1. the user is not logged in
@@ -2357,7 +2357,7 @@
         * @param string $action Action that was denied or null if unknown
         * @return string The wikitext error-messages, formatted into a list.
         */
-       public function formatPermissionsErrorMessage( $errors, $action = null 
) {
+       public function formatPermissionsErrorMessage( array $errors, $action = 
null ) {
                if ( $action == null ) {
                        $text = $this->msg( 'permissionserrorstext', count( 
$errors ) )->plain() . "\n\n";
                } else {
@@ -2410,7 +2410,7 @@
         * @throws ReadOnlyError
         */
        public function readOnlyPage( $source = null, $protected = false,
-               $reasons = array(), $action = null
+               array $reasons = array(), $action = null
        ) {
                $this->setRobotPolicy( 'noindex,nofollow' );
                $this->setArticleRelated( false );
@@ -2529,7 +2529,7 @@
         * @param string $text Text of the link (input is not escaped)
         * @param array $options Options array to pass to Linker
         */
-       public function addReturnTo( $title, $query = array(), $text = null, 
$options = array() ) {
+       public function addReturnTo( $title, array $query = array(), $text = 
null, $options = array() ) {
                $link = $this->msg( 'returnto' )->rawParams(
                        Linker::link( $title, $text, array(), $query, $options 
) )->escaped();
                $this->addHTML( "<p id=\"mw-returnto\">{$link}</p>\n" );
@@ -2861,7 +2861,7 @@
         * @param array $links
         * @return string HTML
         */
-       protected static function getHtmlFromLoaderLinks( Array $links ) {
+       protected static function getHtmlFromLoaderLinks( array $links ) {
                $html = '';
                $states = array();
                foreach ( $links as $link ) {
@@ -3638,7 +3638,7 @@
         * @param array $options Option, can contain 'condition', 'dir', 
'media' keys
         * @return string HTML fragment
         */
-       protected function styleLink( $style, $options ) {
+       protected function styleLink( $style, array $options ) {
                if ( isset( $options['dir'] ) ) {
                        if ( $this->getLanguage()->getDir() != $options['dir'] 
) {
                                return '';
@@ -3799,7 +3799,7 @@
         * @since 1.16
         * @deprecated since 1.17
         */
-       public function includeJQuery( $modules = array() ) {
+       public function includeJQuery( array $modules = array() ) {
                return array();
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/148590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b37a95e517e120471c709823ea319f60165be0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Withoutaname <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to