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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
......................................................................

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

Exclude all failing sniffs for now.

And add a "composer fix" command for phpcbf.

Change-Id: I57c67dc96658a79a0285983b7b217f6380048bbb
---
M RemexHtml/FuzzTest/Utils.php
M RemexHtml/Serializer/Formatter.php
M RemexHtml/Serializer/Serializer.php
M RemexHtml/Tokenizer/PlainAttributes.php
M RemexHtml/Tokenizer/TokenHandler.php
M RemexHtml/Tokenizer/Tokenizer.php
M RemexHtml/TreeBuilder/ActiveFormattingElements.php
M RemexHtml/TreeBuilder/Dispatcher.php
M RemexHtml/TreeBuilder/InsertionMode.php
M RemexHtml/TreeBuilder/Marker.php
M RemexHtml/TreeBuilder/Stack.php
M RemexHtml/TreeBuilder/TemplateModeStack.php
M RemexHtml/TreeBuilder/TreeBuilder.php
M RemexHtml/TreeBuilder/TreeHandler.php
M RemexHtml/TreeBuilder/TreeMutationTracer.php
M composer.json
M phpcs.xml
M tests/phplint/autoload.php
M tests/phpunit/TokenizerTest.php
19 files changed, 97 insertions(+), 89 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/libs/RemexHtml 
refs/changes/81/377181/1

diff --git a/RemexHtml/FuzzTest/Utils.php b/RemexHtml/FuzzTest/Utils.php
index c3ea590..fcc7407 100644
--- a/RemexHtml/FuzzTest/Utils.php
+++ b/RemexHtml/FuzzTest/Utils.php
@@ -9,7 +9,7 @@
         * Generate a pseudorandom boolean value.
         *
         * @param float $p The probability of the function returning true
-        * @return boolean
+        * @return bool
         */
        public static function coinToss( $p ) {
                return mt_rand() / mt_getrandmax() < $p;
diff --git a/RemexHtml/Serializer/Formatter.php 
b/RemexHtml/Serializer/Formatter.php
index 9a2f4fb..24987fa 100644
--- a/RemexHtml/Serializer/Formatter.php
+++ b/RemexHtml/Serializer/Formatter.php
@@ -27,8 +27,8 @@
         *
         * @param SerializerNode $parent The parent of the text node (at 
creation time)
         * @param string $text
-        * @param integer $start The offset within $text
-        * @param integer $length The number of bytes within $text
+        * @param int $start The offset within $text
+        * @param int $length The number of bytes within $text
         * @return string
         */
        function characters( SerializerNode $parent, $text, $start, $length );
diff --git a/RemexHtml/Serializer/Serializer.php 
b/RemexHtml/Serializer/Serializer.php
index ad7ec8d..786c969 100644
--- a/RemexHtml/Serializer/Serializer.php
+++ b/RemexHtml/Serializer/Serializer.php
@@ -187,12 +187,12 @@
        /**
         * Insert an element
         *
-        * @param integer $preposition
+        * @param int $preposition
         * @param Element|SerializerNode|null $refElement
         * @param Element $element
         * @param bool $void
-        * @param integer $sourceStart
-        * @param integer $sourceLength
+        * @param int $sourceStart
+        * @param int $sourceLength
         */
        public function insertElement( $preposition, $refElement, Element 
$element, $void,
                $sourceStart, $sourceLength
diff --git a/RemexHtml/Tokenizer/PlainAttributes.php 
b/RemexHtml/Tokenizer/PlainAttributes.php
index b0079a1..544539b 100644
--- a/RemexHtml/Tokenizer/PlainAttributes.php
+++ b/RemexHtml/Tokenizer/PlainAttributes.php
@@ -5,7 +5,7 @@
 /**
  * An Attributes implementation which is a simple array proxy.
  */
-class PlainAttributes implements Attributes  {
+class PlainAttributes implements Attributes {
        protected $data;
        protected $attrObjects;
 
diff --git a/RemexHtml/Tokenizer/TokenHandler.php 
b/RemexHtml/Tokenizer/TokenHandler.php
index 06f98c0..df75e5f 100644
--- a/RemexHtml/Tokenizer/TokenHandler.php
+++ b/RemexHtml/Tokenizer/TokenHandler.php
@@ -22,7 +22,7 @@
 
        /**
         * Called when the end of the input string is consumed
-        * @param integer $pos The input position (past the end)
+        * @param int $pos The input position (past the end)
         */
        function endDocument( $pos );
 
@@ -33,7 +33,7 @@
         * output.
         *
         * @param string $text The error message
-        * @param integer $pos The input position
+        * @param int $pos The input position
         */
        function error( $text, $pos );
 
@@ -44,10 +44,10 @@
         * some copying, at least if ignoreCharRefs and ignoreNulls are enabled.
         *
         * @param string $text The string which contains the emitted characters
-        * @param integer $start The start of the range within $text to use
-        * @param integer $length The length of the range within $text to use
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The input length
+        * @param int $start The start of the range within $text to use
+        * @param int $length The length of the range within $text to use
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The input length
         */
        function characters( $text, $start, $length, $sourceStart, 
$sourceLength );
 
@@ -60,8 +60,8 @@
         * @param string $name The tag name
         * @param Attributes $attrs The tag attributes
         * @param bool $selfClose Whether there is a self-closing slash
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The input length
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The input length
         */
        function startTag( $name, Attributes $attrs, $selfClose, $sourceStart, 
$sourceLength );
 
@@ -69,8 +69,8 @@
         * An end tag event.
         *
         * @param string $name The tag name
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The input length
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The input length
         */
        function endTag( $name, $sourceStart, $sourceLength );
 
@@ -81,8 +81,8 @@
         * @param string|null $public The public identifier, or null if none 
was found
         * @param string|null $system The system identifier, or null if none 
was found
         * @param bool $quirks What the spec calls the "force-quirks flag"
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The input length
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The input length
         */
        function doctype( $name, $public, $system, $quirks, $sourceStart, 
$sourceLength );
 
@@ -90,8 +90,8 @@
         * A comment.
         *
         * @param string $text The inner text of the comment
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The input length
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The input length
         */
        function comment( $text, $sourceStart, $sourceLength );
 }
diff --git a/RemexHtml/Tokenizer/Tokenizer.php 
b/RemexHtml/Tokenizer/Tokenizer.php
index 3cf3540..3567dab 100644
--- a/RemexHtml/Tokenizer/Tokenizer.php
+++ b/RemexHtml/Tokenizer/Tokenizer.php
@@ -166,7 +166,7 @@
         * Change the state of the tokenizer during parsing. This for use by the
         * tree builder to switch the tokenizer into one of the raw text states.
         *
-        * @param integer $state One of the STATE_* constants
+        * @param int $state One of the STATE_* constants
         * @param string $appropriateEndTag The appropriate end tag
         */
        public function switchState( $state, $appropriateEndTag ) {
@@ -191,7 +191,7 @@
                switch ( $tagName ) {
                case 'title':
                case 'textarea':
-                       $this->state = Tokenizer::STATE_RCDATA;
+                       $this->state = self::STATE_RCDATA;
                        break;
 
                case 'style':
@@ -199,21 +199,21 @@
                case 'iframe':
                case 'noembed':
                case 'noframes':
-                       $this->state = Tokenizer::STATE_RAWTEXT;
+                       $this->state = self::STATE_RAWTEXT;
                        break;
 
                case 'script':
-                       $this->state = Tokenizer::STATE_SCRIPT_DATA;
+                       $this->state = self::STATE_SCRIPT_DATA;
                        break;
 
                case 'noscript':
                        if ( $this->scriptingFlag ) {
-                               $this->state = Tokenizer::STATE_RAWTEXT;
+                               $this->state = self::STATE_RAWTEXT;
                        }
                        break;
 
                case 'plaintext':
-                       $this->state = Tokenizer::STATE_PLAINTEXT;
+                       $this->state = self::STATE_PLAINTEXT;
                        break;
                }
        }
@@ -348,7 +348,7 @@
         *
         * @param bool $loop True to loop while still in the data state, false 
to
         *   process a single less-than sign.
-        * @return integer The next state index
+        * @return int The next state index
         */
        protected function dataState( $loop ) {
                $re = "~ <
@@ -534,7 +534,7 @@
                                        $contents = $this->handleNulls( 
$contents, $bogusPos );
                                        $this->listener->comment( $contents, 
$this->pos, $endPos - $this->pos );
                                }
-                       } elseif ( isset ( $m[self::MD_BOGUS_COMMENT] ) && 
$m[self::MD_BOGUS_COMMENT][1] >= 0 ) {
+                       } elseif ( isset( $m[self::MD_BOGUS_COMMENT] ) && 
$m[self::MD_BOGUS_COMMENT][1] >= 0 ) {
                                // Bogus comment
                                $contents = $m[self::MD_BOGUS_COMMENT][0];
                                $bogusPos = $m[self::MD_BOGUS_COMMENT][1];
@@ -742,7 +742,7 @@
         * replaced with U+FFFD with a parse error issued.
         *
         * @param string $text The text to be converted
-        * @param integer $sourcePos The input byte offset from which $text was
+        * @param int $sourcePos The input byte offset from which $text was
         *   extracted, for error position reporting.
         * @return string The converted text
         */
@@ -775,9 +775,9 @@
         *
         * @param string $mask Mask for strcspn
         * @param string $text The input text
-        * @param integer $offset The start of the range within $text to search
-        * @param integer $length The length of the range within $text to search
-        * @param integer $sourcePos The offset within the input text 
corresponding
+        * @param int $offset The start of the range within $text to search
+        * @param int $length The length of the range within $text to search
+        * @param int $sourcePos The offset within the input text corresponding
         *   to $text, for error position reporting.
         */
        protected function handleAsciiErrors( $mask, $text, $offset, $length, 
$sourcePos ) {
@@ -803,7 +803,7 @@
        /**
         * Expand character references in some text, and emit errors as 
appropriate.
         * @param string $text The text to expand
-        * @param integer $sourcePos The input position of $text
+        * @param int $sourcePos The input position of $text
         * @param bool $inAttr True if the text is within an attribute value
         * @param string $additionalAllowedChar An unused string which the spec
         *   inexplicably spends a lot of space telling you how to derive. It
@@ -986,8 +986,8 @@
         * Emit a range of the input text as a character token, and emit related
         * errors, with validity rules as per the data state.
         *
-        * @param integer $pos Offset within the input text
-        * @param integer $length The length of the range
+        * @param int $pos Offset within the input text
+        * @param int $length The length of the range
         */
        protected function emitDataRange( $pos, $length ) {
                if ( $length === 0 ) {
@@ -1030,8 +1030,8 @@
         * that as a parameter.
         *
         * @param bool $ignoreCharRefs
-        * @param integer $pos The input position
-        * @param integer $length The length of the range to be emitted
+        * @param int $pos The input position
+        * @param int $length The length of the range to be emitted
         */
        protected function emitRawTextRange( $ignoreCharRefs, $pos, $length ) {
                if ( $length === 0 ) {
@@ -1054,7 +1054,7 @@
         * The entry point for the RCDATA and RAWTEXT states.
         * @param bool $ignoreCharRefs True to ignore character references 
regardless
         *   of configuration, false to respect the configuration.
-        * @return integer The next state index
+        * @return int The next state index
         */
        protected function textElementState( $ignoreCharRefs ) {
                if ( $this->appropriateEndTag === null ) {
@@ -1253,11 +1253,11 @@
         * Emit the appropriate tag event, or in the case of broken attributes 
in
         * text states, emit characters.
         *
-        * @param integer $state The current state
+        * @param int $state The current state
         * @param string $tagName The normalized tag name
         * @param bool $isEndTag True if this is an end tag, false if it is a 
start tag
-        * @param integer $startPos The input position of the start of the 
current tag.
-        * @return integer The next state
+        * @param int $startPos The input position of the start of the current 
tag.
+        * @return int The next state
         */
        protected function handleAttribsAndClose( $state, $tagName, $isEndTag, 
$startPos ) {
                $attribStartPos = $this->pos;
@@ -1312,7 +1312,7 @@
 
        /**
         * Process input text in the PLAINTEXT state
-        * @return integer The next state index
+        * @return int The next state index
         */
        protected function plaintextState() {
                $this->emitRawTextRange( true, $this->pos, $this->length - 
$this->pos );
@@ -1321,7 +1321,7 @@
 
        /**
         * Process input text in the script data state
-        * @return integer The next state index
+        * @return int The next state index
         */
        protected function scriptDataState() {
                if ( $this->appropriateEndTag === null ) {
@@ -1413,7 +1413,7 @@
        /**
         * Emit a parse error event.
         * @param string $text The error message
-        * @param integer|null $pos The error position, or null to use the 
current position
+        * @param int|null $pos The error position, or null to use the current 
position
         */
        protected function error( $text, $pos = null ) {
                if ( !$this->ignoreErrors ) {
@@ -1482,4 +1482,3 @@
                throw new TokenizerError( __CLASS__.": $msg" );
        }
 }
-
diff --git a/RemexHtml/TreeBuilder/ActiveFormattingElements.php 
b/RemexHtml/TreeBuilder/ActiveFormattingElements.php
index 1647e8b..8b3bc30 100644
--- a/RemexHtml/TreeBuilder/ActiveFormattingElements.php
+++ b/RemexHtml/TreeBuilder/ActiveFormattingElements.php
@@ -154,7 +154,7 @@
        /**
         * Determine whether an element is in the list of formatting elements.
         * @param Element $elt
-        * @return boolean
+        * @return bool
         */
        public function isInList( Element $elt ) {
                return $this->head === $elt || $elt->prevAFE;
diff --git a/RemexHtml/TreeBuilder/Dispatcher.php 
b/RemexHtml/TreeBuilder/Dispatcher.php
index e6ecf1b..657ac7e 100644
--- a/RemexHtml/TreeBuilder/Dispatcher.php
+++ b/RemexHtml/TreeBuilder/Dispatcher.php
@@ -132,7 +132,7 @@
        /**
         * Switch the insertion mode, and return the new handler
         *
-        * @param integer $mode
+        * @param int $mode
         * @return InsertionMode
         */
        public function switchMode( $mode ) {
@@ -144,7 +144,7 @@
         * Let the original insertion mode be the current insertion mode, and
         * switch the insertion mode to some new value. Return the new handler.
         *
-        * @param integer $mode
+        * @param int $mode
         * @return InsertionMode
         */
        public function switchAndSave( $mode ) {
@@ -209,7 +209,7 @@
         * Get the insertion mode index which is switched to when we reset the
         * insertion mode appropriately.
         *
-        * @return integer
+        * @return int
         */
        protected function getAppropriateMode() {
                $builder = $this->builder;
diff --git a/RemexHtml/TreeBuilder/InsertionMode.php 
b/RemexHtml/TreeBuilder/InsertionMode.php
index 5d4cd08..0029cab 100644
--- a/RemexHtml/TreeBuilder/InsertionMode.php
+++ b/RemexHtml/TreeBuilder/InsertionMode.php
@@ -119,4 +119,3 @@
        abstract public function endTag( $name, $sourceStart, $sourceLength );
        abstract public function endDocument( $pos );
 }
-
diff --git a/RemexHtml/TreeBuilder/Marker.php b/RemexHtml/TreeBuilder/Marker.php
index 80029e5..3e39c7d 100644
--- a/RemexHtml/TreeBuilder/Marker.php
+++ b/RemexHtml/TreeBuilder/Marker.php
@@ -20,4 +20,3 @@
                PropGuard::set( $this, $name, $value );
        }
 }
-
diff --git a/RemexHtml/TreeBuilder/Stack.php b/RemexHtml/TreeBuilder/Stack.php
index b0a976b..b36a3d4 100644
--- a/RemexHtml/TreeBuilder/Stack.php
+++ b/RemexHtml/TreeBuilder/Stack.php
@@ -109,7 +109,7 @@
         * and $this->length() - 1 is the most recently inserted element. This 
will
         * raise a PHP notice if the index is out of range.
         *
-        * @param integer $idx
+        * @param int $idx
         * @return Element|null
         */
        abstract public function item( $idx );
diff --git a/RemexHtml/TreeBuilder/TemplateModeStack.php 
b/RemexHtml/TreeBuilder/TemplateModeStack.php
index fb5be9e..3416f76 100644
--- a/RemexHtml/TreeBuilder/TemplateModeStack.php
+++ b/RemexHtml/TreeBuilder/TemplateModeStack.php
@@ -22,7 +22,7 @@
 
        /**
         * Push a mode on to the stack
-        * @param integer $mode
+        * @param int $mode
         */
        public function push( $mode ) {
                $this->nonCurrentModes[] = $this->current;
diff --git a/RemexHtml/TreeBuilder/TreeBuilder.php 
b/RemexHtml/TreeBuilder/TreeBuilder.php
index fe2a212..fb490c8 100644
--- a/RemexHtml/TreeBuilder/TreeBuilder.php
+++ b/RemexHtml/TreeBuilder/TreeBuilder.php
@@ -326,8 +326,8 @@
         * @author C. Scott Ananian, Tim Starling
         *
         * @param string $subject The subject tag name.
-        * @param integer $sourceStart
-        * @param integer $sourceLength
+        * @param int $sourceStart
+        * @param int $sourceLength
         */
        public function adoptionAgency( $subject, $sourceStart, $sourceLength ) 
{
                $afe = $this->afe;
@@ -403,7 +403,7 @@
                        $furthestBlockIndex = -1;
                        $stackLength = $stack->length();
 
-                       for ( $i = $fmtEltIndex+1; $i < $stackLength; $i++ ) {
+                       for ( $i = $fmtEltIndex + 1; $i < $stackLength; $i++ ) {
                                $item = $stack->item( $i );
                                if ( isset( 
HTMLData::$special[$item->namespace][$item->name] ) ) {
                                        $furthestBlock = $item;
@@ -612,7 +612,7 @@
         * Generate implied end tags, optionally with an element to exclude.
         *
         * @param string|null $name The name to exclude
-        * @param integer $pos The source position
+        * @param int $pos The source position
         */
        public function generateImpliedEndTags( $name, $pos ) {
                $stack = $this->stack;
@@ -648,8 +648,8 @@
         * the list.
         *
         * @param string $name The name to exclude
-        * @param integer $sourceStart
-        * @param integer $sourceLength
+        * @param int $sourceStart
+        * @param int $sourceLength
         */
        public function generateImpliedEndTagsAndPop( $name, $sourceStart, 
$sourceLength ) {
                $this->generateImpliedEndTags( $name, $sourceStart );
@@ -708,7 +708,7 @@
         * not popped, and a set of names is used instead of a single name.
         *
         * @param array $names
-        * @param integer $pos
+        * @param int $pos
         */
        public function clearStackBack( $names, $pos ) {
                $stack = $this->stack;
diff --git a/RemexHtml/TreeBuilder/TreeHandler.php 
b/RemexHtml/TreeBuilder/TreeHandler.php
index 8ad34dc..e8f209f 100644
--- a/RemexHtml/TreeBuilder/TreeHandler.php
+++ b/RemexHtml/TreeBuilder/TreeHandler.php
@@ -17,14 +17,14 @@
        /**
         * Called when parsing stops.
         *
-        * @param integer $pos The input string length, i.e. the past-the-end 
position.
+        * @param int $pos The input string length, i.e. the past-the-end 
position.
         */
        function endDocument( $pos );
 
        /**
         * Insert characters.
         *
-        * @param integer $preposition The placement of the new node with 
respect
+        * @param int $preposition The placement of the new node with respect
         *   to $ref. May be TreeBuilder::
         *    - BEFORE: insert as a sibling before the reference element
         *    - UNDER: append as the last child of the reference element
@@ -34,12 +34,12 @@
         * @param string $text The text to insert is a substring of this string,
         *   with the start and length of the substring given by $start and
         *   $length. We do it this way to avoid unnecessary copying.
-        * @param integer $start The start of the substring
-        * @param integer $length The length of the substring
-        * @param integer $sourceStart The input position. This is not 
necessarily
+        * @param int $start The start of the substring
+        * @param int $length The length of the substring
+        * @param int $sourceStart The input position. This is not necessarily
         *   accurate, particularly when the tokenizer is run without 
ignoreEntities,
         *   or in CDATA sections.
-        * @param integer $sourceLength The length of the input which is 
consumed.
+        * @param int $sourceLength The length of the input which is consumed.
         *   The same caveats apply as for $sourceStart.
         */
        function characters( $preposition, $ref, $text, $start, $length, 
$sourceStart, $sourceLength );
@@ -50,7 +50,7 @@
         * identifier to the userData property of the Element object, to 
identify
         * the element when it is used again in subsequent tree mutations.
         *
-        * @param integer $preposition The placement of the new node with 
respect
+        * @param int $preposition The placement of the new node with respect
         *   to $ref. May be TreeBuilder::
         *    - BEFORE: insert as a sibling before the reference element
         *    - UNDER: append as the last child of the reference element
@@ -68,8 +68,8 @@
         *   sent for such an element. This is only true if self-closing tags 
are
         *   acknowledged for this tag name, so it is a hint to the serializer 
that
         *   a self-closing tag is acceptable.
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The length of the input which is 
consumed
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The length of the input which is consumed
         */
        function insertElement( $preposition, $ref, Element $element, $void,
                $sourceStart, $sourceLength );
@@ -79,8 +79,8 @@
         * of open elements. It probably won't be mutated again.
         *
         * @param Element $element The element being ended
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The length of the input which is 
consumed
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The length of the input which is consumed
         */
        function endTag( Element $element, $sourceStart, $sourceLength );
 
@@ -90,19 +90,19 @@
         * @param string $name The doctype name, usually "html"
         * @param string $public The PUBLIC identifier
         * @param string $system The SYSTEM identifier
-        * @param integer $quirks The quirks mode implied from the doctype. One 
of:
+        * @param int $quirks The quirks mode implied from the doctype. One of:
         *   - TreeBuilder::NO_QUIRKS : no quirks
         *   - TreeBuilder::LIMITED_QUIRKS : limited quirks
         *   - TreeBuilder::QUIRKS : full quirks
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The length of the input which is 
consumed
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The length of the input which is consumed
         */
        function doctype( $name, $public, $system, $quirks, $sourceStart, 
$sourceLength );
 
        /**
         * Insert a comment
         *
-        * @param integer $preposition The placement of the new node with 
respect
+        * @param int $preposition The placement of the new node with respect
         *   to $ref. May be TreeBuilder::
         *    - BEFORE: insert as a sibling before the reference element
         *    - UNDER: append as the last child of the reference element
@@ -110,8 +110,8 @@
         * @param Element|null $ref Insert before/below this element, or null if
         *   $preposition is ROOT.
         * @param string $text The text of the comment
-        * @param integer $sourceStart The input position
-        * @param integer $sourceLength The length of the input which is 
consumed
+        * @param int $sourceStart The input position
+        * @param int $sourceLength The length of the input which is consumed
         */
        function comment( $preposition, $ref, $text, $sourceStart, 
$sourceLength );
 
@@ -121,7 +121,7 @@
         * @param string $text An error message explaining in English what the
         *   author did wrong, and what the parser intends to do about the
         *   situation.
-        * @param integer $pos The input position at which the error occurred
+        * @param int $pos The input position at which the error occurred
         */
        function error( $text, $pos );
 
@@ -133,7 +133,7 @@
         *
         * @param Element $element The element to update
         * @param Attributes $attrs The new attributes to add
-        * @param integer $sourceStart The input position
+        * @param int $sourceStart The input position
         */
        function mergeAttributes( Element $element, Attributes $attrs, 
$sourceStart );
 
@@ -143,7 +143,7 @@
         * partially-constructed body element.
         *
         * @param Element $element The element to remove
-        * @param integer $sourceStart The location in the source at which this
+        * @param int $sourceStart The location in the source at which this
         *   action was triggered.
         */
        function removeNode( Element $element, $sourceStart );
@@ -155,7 +155,7 @@
         *
         * @param Element $element The old parent element
         * @param Element $newParent The new parent element
-        * @param integer $sourceStart The location in the source at which this
+        * @param int $sourceStart The location in the source at which this
         *   action was triggered.
         */
        function reparentChildren( Element $element, Element $newParent, 
$sourceStart );
diff --git a/RemexHtml/TreeBuilder/TreeMutationTracer.php 
b/RemexHtml/TreeBuilder/TreeMutationTracer.php
index a34394d..a9244f6 100644
--- a/RemexHtml/TreeBuilder/TreeMutationTracer.php
+++ b/RemexHtml/TreeBuilder/TreeMutationTracer.php
@@ -15,7 +15,7 @@
         *
         * @param TreeHandler $handler The next pipeline stage
         * @param callable $callback The message output function
-        * @param integer $verbosity Set to non-zero to call dump() on the 
handler
+        * @param int $verbosity Set to non-zero to call dump() on the handler
         *   before and after each event.
         */
        public function __construct( TreeHandler $handler, callable $callback, 
$verbosity = 0 ) {
diff --git a/composer.json b/composer.json
index 95f78cc..3812cea 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
        },
        "require-dev": {
                "phpunit/phpunit": "4.*",
-               "mediawiki/mediawiki-codesniffer": "0.7.2"
+               "mediawiki/mediawiki-codesniffer": "0.12.0"
        },
        "autoload": {
                "psr-4": {
@@ -26,6 +26,7 @@
                        "phpunit",
                        "phpcs -p"
                ],
-               "phpcs": "phpcs -s"
+               "phpcs": "phpcs -s",
+               "fix": "phpcbf"
        }
 }
diff --git a/phpcs.xml b/phpcs.xml
index 8e2c3a4..81de04b 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -5,6 +5,17 @@
                <exclude 
name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix" />
                <exclude 
name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed" />
                <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.EmptyComment" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
+               <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
+               <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+               <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" 
/>
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
+               <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+               <exclude 
name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
        </rule>
        <file>.</file>
        <arg name="extensions" value="php"/>
diff --git a/tests/phplint/autoload.php b/tests/phplint/autoload.php
index d4e6d9f..86281a8 100644
--- a/tests/phplint/autoload.php
+++ b/tests/phplint/autoload.php
@@ -18,4 +18,3 @@
        require_once '../../' .
                str_replace( '\\', '/', $className ) . '.php';
 }
-
diff --git a/tests/phpunit/TokenizerTest.php b/tests/phpunit/TokenizerTest.php
index db9cdb9..2a9eb4c 100644
--- a/tests/phpunit/TokenizerTest.php
+++ b/tests/phpunit/TokenizerTest.php
@@ -35,7 +35,7 @@
                                continue;
                        }
                        foreach ( $testData['tests'] as $test ) {
-                               $states = isset( $test['initialStates'] ) ? 
$test['initialStates']  : [ 'data state' ];
+                               $states = isset( $test['initialStates'] ) ? 
$test['initialStates'] : [ 'data state' ];
                                $input = $test['input'];
                                $output = $test['output'];
                                $appropriateEndTag = isset( 
$test['lastStartTag'] ) ? $test['lastStartTag'] : null;
@@ -131,7 +131,7 @@
                        'appropriateEndTag' => $appropriateEndTag ] );
                $output = $this->normalizeErrors( $handler->getTokens() );
                $expected = $this->normalizeErrors( $expected );
-               $jsonOptions =  JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
+               $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
                $this->assertEquals(
                        json_encode( $expected, $jsonOptions ),
                        json_encode( $output, $jsonOptions ) );
@@ -146,7 +146,7 @@
                        'appropriateEndTag' => $appropriateEndTag ] );
                $output = $this->normalizeErrors( $handler->getTokens(), true );
                $expected = $this->normalizeErrors( $expected, true );
-               $jsonOptions =  JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
+               $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
                $this->assertEquals(
                        json_encode( $expected, $jsonOptions ),
                        json_encode( $output, $jsonOptions ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57c67dc96658a79a0285983b7b217f6380048bbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/RemexHtml
Gerrit-Branch: master
Gerrit-Owner: Legoktm <lego...@member.fsf.org>

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

Reply via email to