@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @throws InvalidArgumentException |
43 | 43 | */ |
44 | - public function __construct( $content, $isSortable = false, $isRawContent = false ) { |
|
45 | - Assert::parameterType( 'string', $content, '$content' ); |
|
46 | - Assert::parameterType( 'boolean', $isSortable, '$isSortable' ); |
|
47 | - Assert::parameterType( 'boolean', $isRawContent, '$isRawContent' ); |
|
44 | + public function __construct($content, $isSortable = false, $isRawContent = false) { |
|
45 | + Assert::parameterType('string', $content, '$content'); |
|
46 | + Assert::parameterType('boolean', $isSortable, '$isSortable'); |
|
47 | + Assert::parameterType('boolean', $isRawContent, '$isRawContent'); |
|
48 | 48 | |
49 | 49 | $this->content = $content; |
50 | 50 | $this->isSortable = $isSortable; |
@@ -71,19 +71,19 @@ discard block |
||
71 | 71 | * @return string HTML |
72 | 72 | */ |
73 | 73 | public function toHtml() { |
74 | - $attributes = [ 'role' => 'columnheader button' ]; |
|
74 | + $attributes = ['role' => 'columnheader button']; |
|
75 | 75 | |
76 | - if ( !$this->isSortable ) { |
|
76 | + if (!$this->isSortable) { |
|
77 | 77 | $attributes['class'] = 'unsortable'; |
78 | 78 | } |
79 | 79 | |
80 | - if ( !$this->isRawContent ) { |
|
81 | - $content = htmlspecialchars( $this->content ); |
|
80 | + if (!$this->isRawContent) { |
|
81 | + $content = htmlspecialchars($this->content); |
|
82 | 82 | } else { |
83 | 83 | $content = $this->content; |
84 | 84 | } |
85 | 85 | |
86 | - return Html::rawElement( 'th', $attributes, $content ); |
|
86 | + return Html::rawElement('th', $attributes, $content); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | } |