Drop HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25
[lhc/web/wiklou.git] / includes / tidy / Balancer.php
index e570633..c7d9a26 100644 (file)
  * @since 1.27
  * @author C. Scott Ananian, 2016
  */
+
 namespace MediaWiki\Tidy;
 
+use ExplodeIterator;
+use IteratorAggregate;
+use ReverseArrayIterator;
+use Sanitizer;
 use Wikimedia\Assert\Assert;
 use Wikimedia\Assert\ParameterAssertionException;
-use \ExplodeIterator;
-use \IteratorAggregate;
-use \ReverseArrayIterator;
-use \Sanitizer;
 
 // A note for future librarization[1] -- this file is a good candidate
 // for splitting into an independent library, except that it is currently
@@ -1365,7 +1366,7 @@ class BalanceStack implements IteratorAggregate {
                foreach ( $this->elements as $elt ) {
                        array_push( $r, $elt->localName );
                }
-               return implode( $r, ' ' );
+               return implode( ' ', $r );
        }
 }
 
@@ -1903,7 +1904,7 @@ class Balancer {
                                }
                        );
                        if ( count( $bad ) > 0 ) {
-                               $badstr = implode( array_keys( $bad ), ',' );
+                               $badstr = implode( ',', array_keys( $bad ) );
                                throw new ParameterAssertionException(
                                        '$config',
                                        'Balance attempted with sanitization including ' .