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

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

Improve some parameter docs

Change-Id: I8d0e913584838ceb6482d60361eaa273e7a856d9
---
M includes/HieroTokenizer.php
M includes/SpecialHieroglyphs.php
M includes/WikiHiero.php
M includes/WikiHieroHooks.php
M phpcs.xml
5 files changed, 15 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/wikihiero 
refs/changes/46/384246/1

diff --git a/includes/HieroTokenizer.php b/includes/HieroTokenizer.php
index 2c2b9a1..1521ad0 100644
--- a/includes/HieroTokenizer.php
+++ b/includes/HieroTokenizer.php
@@ -34,7 +34,7 @@
        /**
         * Constructor
         *
-        * @param $text string
+        * @param string $text
         */
        public function __construct( $text ) {
                $this->text = $text;
diff --git a/includes/SpecialHieroglyphs.php b/includes/SpecialHieroglyphs.php
index 1ea4ad6..570192e 100644
--- a/includes/SpecialHieroglyphs.php
+++ b/includes/SpecialHieroglyphs.php
@@ -100,6 +100,7 @@
 
        /**
         * Returns a HTML list of hieroglyphs
+        * @return string
         */
        private function listHieroglyphs() {
                global $wgMemc;
diff --git a/includes/WikiHiero.php b/includes/WikiHiero.php
index f94ac9b..d224eac 100644
--- a/includes/WikiHiero.php
+++ b/includes/WikiHiero.php
@@ -71,6 +71,10 @@
 
        /**
         * Parser callback for <hiero> tag
+        * @param string $input
+        * @param array $args
+        * @param Parser $parser
+        * @return string
         */
        public static function parserHook( $input, $args = [], $parser ) {
                $hiero = new WikiHiero();
@@ -118,10 +122,10 @@
        /**
         * Renders a glyph into an <img> tag
         *
-        * @param string $glyph: Glyph to render
-        * @param int|null $height: Image height, if null don't set explicitly
-        * @param int|null $margin: Margin, if null don't set
-        * @param string|null $class: Class for <img> tag
+        * @param string $glyph Glyph to render
+        * @param int|null $height Image height, if null don't set explicitly
+        * @param int|null $margin Margin, if null don't set
+        * @param string|null $class Class for <img> tag
         * @return string Rendered HTML
         */
        private function renderGlyphImage( $glyph, $height = null, $margin = 
null, $class = null ) {
@@ -188,9 +192,9 @@
        /**
         * Resize a glyph
         *
-        * @param string $item: glyph code
-        * @param bool $is_cartouche: true if glyph is inside a cartouche
-        * @param int $total: total size of a group for multi-glyph block
+        * @param string $item glyph code
+        * @param bool $is_cartouche true if glyph is inside a cartouche
+        * @param int $total total size of a group for multi-glyph block
         * @return float size
         */
        private function resizeGlyph( $item, $is_cartouche = false, $total = 0 
) {
diff --git a/includes/WikiHieroHooks.php b/includes/WikiHieroHooks.php
index 80ce135..40bb5b7 100644
--- a/includes/WikiHieroHooks.php
+++ b/includes/WikiHieroHooks.php
@@ -4,7 +4,7 @@
         * Because <hiero> tag is used rarely, we don't need to load its body 
on every hook call,
         * so we keep our simple hook handlers here.
         *
-        * @param $parser Parser
+        * @param Parser &$parser
         * @return bool
         */
        public static function onParserFirstCallInit( &$parser ) {
diff --git a/phpcs.xml b/phpcs.xml
index b569216..f83c277 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,9 +1,7 @@
 <?xml version="1.0"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
-               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
@@ -13,6 +11,4 @@
        <arg name="extensions" value="php,php5,inc" />
        <arg name="encoding" value="UTF-8" />
        <exclude-pattern>data</exclude-pattern>
-       <exclude-pattern>vendor</exclude-pattern>
-       <exclude-pattern>node_modules</exclude-pattern>
 </ruleset>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d0e913584838ceb6482d60361eaa273e7a856d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/wikihiero
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