Merge "Fix return type of UploadBase::check* functions"
[lhc/web/wiklou.git] / includes / widget / CheckMatrixWidget.php
index 017e616..06d8095 100644 (file)
@@ -19,8 +19,6 @@ class CheckMatrixWidget extends \OOUI\Widget {
        protected $forcedOff = [];
 
        /**
-        * CheckMatrixWidget constructor
-        *
         * Operates similarly to MultiSelectWidget, but instead of using an array of
         * options, uses an array of rows and an array of columns to dynamically
         * construct a matrix of options. The tags used to identify a particular cell
@@ -67,7 +65,7 @@ class CheckMatrixWidget extends \OOUI\Widget {
                $tr->appendContent( $this->getCellTag( "\u{00A0}" ) );
                foreach ( $this->columns as $columnLabel => $columnTag ) {
                        $tr->appendContent(
-                               $this->getCellTag( new \OOUI\HtmlSnippet( $columnLabel ) )
+                               $this->getCellTag( new \OOUI\HtmlSnippet( $columnLabel ), 'th' )
                        );
                }
                $thead->appendContent( $tr );
@@ -132,8 +130,8 @@ class CheckMatrixWidget extends \OOUI\Widget {
         * @param  mixed $content Content for the <td> cell
         * @return \OOUI\Tag Resulting cell
         */
-       private function getCellTag( $content ) {
-               $cell = new \OOUI\Tag( 'td' );
+       private function getCellTag( $content, $tagElement = 'td' ) {
+               $cell = new \OOUI\Tag( $tagElement );
                $cell->appendContent( $content );
                return $cell;
        }