Skip to content

Commit 6b97bf1

Browse files
committed
Clean code.
1 parent 9ebfb24 commit 6b97bf1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/View/Helper/BootstrapHtmlHelper.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ class BootstrapHtmlHelper extends HtmlHelper {
7373
*
7474
**/
7575
public function icon ($icon, $options = []) {
76-
return $this->config('useFontAwesome') ? $this->faIcon($icon, $options) : $this->glIcon($icon, $options);
76+
return $this->config('useFontAwesome')?
77+
$this->faIcon($icon, $options) : $this->glIcon($icon, $options);
7778
}
7879

7980
/**
@@ -188,8 +189,12 @@ public function alert ($text, $type = 'warning', $options = []) {
188189
$options += [
189190
'type' => 'warning'
190191
];
191-
$button = '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">'
192-
.'&times;</button>' ;
192+
$button = $this->tag('button', '&times;', [
193+
'type' => 'button',
194+
'class' => 'close',
195+
'data-dismiss' => 'alert',
196+
'aria-hidden' => true
197+
]);
193198
$type = $options['type'];
194199
unset($options['type']) ;
195200
$options = $this->addClass($options, 'alert') ;
@@ -343,7 +348,8 @@ public function dropdown (array $menu = [], array $options = []) {
343348
$url = array_shift($action) ;
344349
$action['role'] = 'menuitem' ;
345350
$action['tabindex'] = -1 ;
346-
$output .= '<li role="presentation">'.$this->link($name, $url, $action).'</li>';
351+
$output .= '<li role="presentation">'
352+
.$this->link($name, $url, $action).'</li>';
347353
}
348354
}
349355
else {

0 commit comments

Comments
 (0)