Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/370830 )

Change subject: Improve some parameter docs
......................................................................

Improve some parameter docs

Change-Id: Icc9381bb24cd18ef23b3f532ba9060dc0142405c
---
M includes/Forms/MetadataMappingForm.php
M includes/Handlers/Forms/FormHandler.php
M includes/Handlers/Forms/MetadataMappingHandler.php
M includes/Handlers/UploadHandler.php
M includes/Handlers/Xml/XmlDetectHandler.php
M includes/Handlers/Xml/XmlHandler.php
M includes/Handlers/Xml/XmlMappingHandler.php
M includes/Hooks/Hooks.php
M includes/Models/Mapping.php
M includes/Models/MediawikiTemplate.php
M includes/Models/Metadata.php
M includes/Php/File.php
M includes/Utils.php
M phpcs.xml
14 files changed, 28 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GWToolset 
refs/changes/30/370830/1

diff --git a/includes/Forms/MetadataMappingForm.php 
b/includes/Forms/MetadataMappingForm.php
index 8505343..6b4f15f 100644
--- a/includes/Forms/MetadataMappingForm.php
+++ b/includes/Forms/MetadataMappingForm.php
@@ -22,7 +22,7 @@
         *
         * @param {GWToolset\Handlers\Forms\FormHandler} $Handler
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         *
         * @return {string}
diff --git a/includes/Handlers/Forms/FormHandler.php 
b/includes/Handlers/Forms/FormHandler.php
index 2417fe1..4f3f151 100644
--- a/includes/Handlers/Forms/FormHandler.php
+++ b/includes/Handlers/Forms/FormHandler.php
@@ -142,7 +142,7 @@
         * 3. preview
         * 4. batch upload
         *
-        * @param {string} $module_name
+        * @param {string} $module
         *
         * @throws {GWTException}
         *
diff --git a/includes/Handlers/Forms/MetadataMappingHandler.php 
b/includes/Handlers/Forms/MetadataMappingHandler.php
index 227f791..b551344 100644
--- a/includes/Handlers/Forms/MetadataMappingHandler.php
+++ b/includes/Handlers/Forms/MetadataMappingHandler.php
@@ -156,7 +156,7 @@
         * to a medifile wiki page; global meaning that these categories
         * are added to all mediafiles that are being uploaded
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         */
        protected function getGlobalCategories( array &$user_options ) {
@@ -365,9 +365,9 @@
         * for processing the metadata and mapping in order to create
         * mediafile wiki pages
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
-        * @param boolean $fromJob Is this coming from a job or direct from user
+        * @param bool $fromJob Is this coming from a job or direct from user
         *
         * @throws {GWTException}
         * @return {array|string}
@@ -512,7 +512,7 @@
         * and returns a response, typically an html form
         *
         * @param {array} $original_post
-        * @param boolean $fromJob
+        * @param bool $fromJob
         *
         * @return {string|array}
         * - an html form, which is filtered in the getForm method
diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index ca4096b..7f2351b 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -925,7 +925,7 @@
         *   - text
         *   - url-to-the-media-file
         *
-        * @param {array} $options
+        * @param {array} &$options
         * @throws {MWException}
         */
        protected function validateUploadParams( array &$options ) {
@@ -964,7 +964,7 @@
        }
 
        /**
-        * @param {array} $options
+        * @param {array} $user_options
         * @throws {MWException}
         */
        protected function validateUserOptions( array $user_options ) {
diff --git a/includes/Handlers/Xml/XmlDetectHandler.php 
b/includes/Handlers/Xml/XmlDetectHandler.php
index e80f14b..9609500 100644
--- a/includes/Handlers/Xml/XmlDetectHandler.php
+++ b/includes/Handlers/Xml/XmlDetectHandler.php
@@ -110,7 +110,7 @@
         *
         * @param {XMLReader|DOMElement} $XMLElement
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         *
         * @throws {MWException}
@@ -438,7 +438,7 @@
         * example xml record that will be used for mapping the mediawiki 
template
         * attributes to the xml metadata elements
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         *
         * @param {string|Content} $xml_source
diff --git a/includes/Handlers/Xml/XmlHandler.php 
b/includes/Handlers/Xml/XmlHandler.php
index 6e57c57..af35ce2 100644
--- a/includes/Handlers/Xml/XmlHandler.php
+++ b/includes/Handlers/Xml/XmlHandler.php
@@ -85,7 +85,7 @@
         * via the $callback to process the file. allows for the reader to be 
stopped
         * if the $callback method returns true to the $stop_reading variable
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         *
         * @param {string} $file_path_local
diff --git a/includes/Handlers/Xml/XmlMappingHandler.php 
b/includes/Handlers/Xml/XmlMappingHandler.php
index 2d19574..a5f6ad2 100644
--- a/includes/Handlers/Xml/XmlMappingHandler.php
+++ b/includes/Handlers/Xml/XmlMappingHandler.php
@@ -72,7 +72,7 @@
        /**
         * helper method for getDOMElementAsArray()
         *
-        * @param {array} $array
+        * @param {array} &$array
         * @param {DOMElement} $DOMElement
         */
        protected function addDOMElementToArray( array &$array, DOMElement 
$DOMElement ) {
@@ -271,7 +271,7 @@
        }
 
        /**
-        * @param {DOMElement} $DOMNodeElement
+        * @param {DOMElement} &$DOMNodeElement
         *
         * @param {bool} $is_url
         *
@@ -304,9 +304,9 @@
         * each matched metadata record, is sent to 
$this->_MappingHandler->processMatchingElement()
         * to be saved as a new mediafile in the wiki or to update an existing 
mediafile in the wiki
         *
-        * @param {XMLReader|DOMElement} $xml_source
+        * @param {XMLReader|DOMElement} $XMLElement
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the html form
         *
         * @throws {MWException}
@@ -399,7 +399,7 @@
         * source. the dom elements will be used for creating mediafile
         * Titles in the wiki.
         *
-        * @param {array} $user_options
+        * @param {array} &$user_options
         * an array of user options that was submitted in the original $_POST
         *
         * @param {string|Content} $xml_source
diff --git a/includes/Hooks/Hooks.php b/includes/Hooks/Hooks.php
index 56e231a..3b43d88 100644
--- a/includes/Hooks/Hooks.php
+++ b/includes/Hooks/Hooks.php
@@ -11,7 +11,7 @@
 class Hooks {
 
        /**
-        * @param {array} $list
+        * @param {array} &$list
         * @return {bool}
         */
        public static function onCanonicalNamespaces( &$list ) {
@@ -21,7 +21,7 @@
        }
 
        /**
-        * @param {array} $files
+        * @param {array} &$files
         * @return {bool}
         */
        public static function onUnitTestsList( &$files ) {
diff --git a/includes/Models/Mapping.php b/includes/Models/Mapping.php
index e051c62..193b581 100644
--- a/includes/Models/Mapping.php
+++ b/includes/Models/Mapping.php
@@ -74,7 +74,7 @@
        /**
         * @todo: sanitize the mapping_array created
         *
-        * @param {array} $options
+        * @param {array} &$options
         *
         * @return {array}
         * the keys and values within the array are not filtered
@@ -154,7 +154,7 @@
        /**
         * attempts to retrieve a wiki page title that contains the metadata 
mapping json
         *
-        * @param {array} $options
+        * @param {array} &$options
         * @throws {GWTException}
         * @return {null|Title}
         */
@@ -181,7 +181,7 @@
        }
 
        /**
-        * @param {array} $options
+        * @param {array} &$options
         */
        protected function populate( array &$options ) {
                if ( empty( $options ) ) {
@@ -213,7 +213,7 @@
        }
 
        /**
-        * @param {array} $options
+        * @param {array} &$options
         * an array of user options that was submitted in the html form
         *
         * @throws {GWTException}
diff --git a/includes/Models/MediawikiTemplate.php 
b/includes/Models/MediawikiTemplate.php
index fcbb427..5b5bf94 100644
--- a/includes/Models/MediawikiTemplate.php
+++ b/includes/Models/MediawikiTemplate.php
@@ -571,7 +571,7 @@
         * template format fro the data adapter, which is used to populate
         * this mediawiki template model
         *
-        * @param {array} $options
+        * @param {array} &$options
         * @throws {GWTException}
         */
        public function retrieve( array &$options = [] ) {
diff --git a/includes/Models/Metadata.php b/includes/Models/Metadata.php
index f8d0f6f..e71c0cf 100644
--- a/includes/Models/Metadata.php
+++ b/includes/Models/Metadata.php
@@ -45,7 +45,7 @@
        }
 
        /**
-        * @param {array} $options
+        * @param {array} &$options
         */
        public function delete( array &$options = [] ) {
        }
@@ -118,13 +118,13 @@
        }
 
        /**
-        * @param {array} $options
+        * @param {array} &$options
         */
        public function retrieve( array &$options = [] ) {
        }
 
        /**
-        * @param {array} $options
+        * @param {array} &$options
         */
        public function update( array &$options = [] ) {
        }
diff --git a/includes/Php/File.php b/includes/Php/File.php
index 2ae0af5..4f1d592 100644
--- a/includes/Php/File.php
+++ b/includes/Php/File.php
@@ -103,7 +103,7 @@
        public $mime_type;
 
        /**
-        * @param {array} $file
+        * @param {array} $file_field_name
         * @return {void}
         */
        public function __construct( $file_field_name = null ) {
diff --git a/includes/Utils.php b/includes/Utils.php
index 63a9b27..cb98ebb 100644
--- a/includes/Utils.php
+++ b/includes/Utils.php
@@ -273,7 +273,7 @@
        /**
         * replaces ‘ ’ with ‘_’
         *
-        * @param {string} $parameter
+        * @param {string} $string
         *
         * @return {string}
         * the string is not filtered
diff --git a/phpcs.xml b/phpcs.xml
index a41ee98..0a56d71 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -17,6 +17,4 @@
        <file>.</file>
        <arg name="encoding" value="UTF-8" />
        <arg name="extensions" value="php,php5,inc" />
-       <exclude-pattern>vendor</exclude-pattern>
-       <exclude-pattern>node_modules</exclude-pattern>
 </ruleset>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc9381bb24cd18ef23b3f532ba9060dc0142405c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to