Andreasburmeister has submitted this change and it was merged.

Change subject: Style changes in the Html classes
......................................................................


Style changes in the Html classes

Change-Id: I9ca9367701e93067b486acf297ab9475bc318ed4
---
M includes/Html/HtmlTable.php
M includes/Html/HtmlTableCell.php
M includes/Html/HtmlTableHeader.php
3 files changed, 10 insertions(+), 25 deletions(-)

Approvals:
  Andreasburmeister: Looks good to me, approved



diff --git a/includes/Html/HtmlTable.php b/includes/Html/HtmlTable.php
index 07a7842..badf488 100644
--- a/includes/Html/HtmlTable.php
+++ b/includes/Html/HtmlTable.php
@@ -5,10 +5,7 @@
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
 use Html;
 
-
 /**
- * Class HtmlTable
- *
  * @package WikidataQuality\Html
  * @author BP2014N1
  * @license GNU GPL v2+
@@ -16,21 +13,17 @@
 class HtmlTable {
 
        /**
-        * Headers of the table.
-        *
-        * @var HtmlTableHeader
+        * @var HtmlTableHeader[]
         */
-       private $headers = array ();
+       private $headers = array();
 
        /**
-        * Rows of the table.
-        *
         * @var array
         */
-       private $rows = array ();
+       private $rows = array();
 
        /**
-        * Determines, whether the table is sortable.
+        * Determines whether the table is sortable.
         *
         * @var bool
         */
@@ -75,7 +68,7 @@
        }
 
        /**
-        * @return array
+        * @return array[]
         */
        public function getRows() {
                return $this->rows;
@@ -94,14 +87,13 @@
         * @param $cells
         */
        public function appendRow( array $cells ) {
-               // Add cells into new row
-               $this->appendRows( array ( $cells ) );
+               $this->appendRows( array( $cells ) );
        }
 
        /**
         * Adds rows with specified cells to table.
         *
-        * @param array $rows
+        * @param array[] $rows
         */
        public function appendRows( array $rows ) {
                // Check rows
@@ -112,7 +104,7 @@
 
                        foreach ( $cells as $cellKey => $cell ) {
                                if ( is_string( $cell ) ) {
-                                       $rows[ $rowKey ][ $cellKey ] = new 
HtmlTableCell( $cell );
+                                       $rows[$rowKey][$cellKey] = new 
HtmlTableCell( $cell );
                                } else if ( !$cell instanceof HtmlTableCell ) {
                                        throw new InvalidArgumentException( 
'$rows must be array of arrays of HtmlTableCell objects.' );
                                }
diff --git a/includes/Html/HtmlTableCell.php b/includes/Html/HtmlTableCell.php
index 78ca845..875f412 100644
--- a/includes/Html/HtmlTableCell.php
+++ b/includes/Html/HtmlTableCell.php
@@ -5,10 +5,7 @@
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
 use Html;
 
-
 /**
- * Class HtmlTableCell
- *
  * @package WikidataQuality\Html
  * @author BP2014N1
  * @license GNU GPL v2+
@@ -37,7 +34,7 @@
        private $colSpan;
 
        /**
-        * @param $content
+        * @param string $content
         * @param int $rowSpan
         * @param int $colSpan
         */
diff --git a/includes/Html/HtmlTableHeader.php 
b/includes/Html/HtmlTableHeader.php
index 831a2b3..a9ce853 100644
--- a/includes/Html/HtmlTableHeader.php
+++ b/includes/Html/HtmlTableHeader.php
@@ -5,10 +5,7 @@
 use Doctrine\Instantiator\Exception\InvalidArgumentException;
 use Html;
 
-
 /**
- * Class HtmlTableHeader
- *
  * @package WikidataQuality\Html
  * @author BP2014N1
  * @license GNU GPL v2+
@@ -34,7 +31,6 @@
         * @param bool $isSortable
         */
        public function __construct( $content, $isSortable = false ) {
-               // Check parameters
                if ( !is_string( $content ) ) {
                        throw new InvalidArgumentException( '$content must be 
string.' );
                }
@@ -70,7 +66,7 @@
                        'role' => 'columnheader button'
                );
                if ( !$this->isSortable ) {
-                       $attributes[ 'class' ] = 'unsortable';
+                       $attributes['class'] = 'unsortable';
                }
 
                return

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ca9367701e93067b486acf297ab9475bc318ed4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Andreasburmeister <andreas.burmeis...@student.hpi.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to