Browse Source

Reformat code te be PSR-2 compatible

tags/2.0.0-beta
SonicGD 11 years ago
parent
commit
5cc2dc8dd4
  1. 2
      Alert.php
  2. 1
      Button.php
  3. 3
      ButtonDropdown.php
  4. 2
      ButtonGroup.php
  5. 3
      Carousel.php
  6. 1
      Collapse.php
  7. 3
      Modal.php
  8. 3
      Nav.php
  9. 1
      NavBar.php
  10. 3
      Progress.php
  11. 3
      Tabs.php
  12. 1
      Widget.php

2
Alert.php

@ -68,7 +68,6 @@ class Alert extends Widget
*/
public $closeButton = [];
/**
* Initializes the widget.
*/
@ -123,6 +122,7 @@ class Alert extends Widget
if ($tag === 'button' && !isset($this->closeButton['type'])) {
$this->closeButton['type'] = 'button';
}
return Html::tag($tag, $label, $this->closeButton);
} else {
return null;

1
Button.php

@ -39,7 +39,6 @@ class Button extends Widget
*/
public $encodeLabel = true;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.

3
ButtonDropdown.php

@ -59,7 +59,6 @@ class ButtonDropdown extends Widget
*/
public $encodeLabel = true;
/**
* Renders the widget.
*/
@ -100,6 +99,7 @@ class ButtonDropdown extends Widget
$options['data-toggle'] = 'dropdown';
$splitButton = '';
}
return Button::widget([
'tagName' => $this->tagName,
'label' => $label,
@ -118,6 +118,7 @@ class ButtonDropdown extends Widget
$config = $this->dropdown;
$config['clientOptions'] = false;
$config['view'] = $this->getView();
return Dropdown::widget($config);
}
}

2
ButtonGroup.php

@ -52,7 +52,6 @@ class ButtonGroup extends Widget
*/
public $encodeLabels = true;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
@ -93,6 +92,7 @@ class ButtonGroup extends Widget
$buttons[] = $button;
}
}
return implode("\n", $buttons);
}
}

3
Carousel.php

@ -61,7 +61,6 @@ class Carousel extends Widget
*/
public $items = [];
/**
* Initializes the widget.
*/
@ -98,6 +97,7 @@ class Carousel extends Widget
}
$indicators[] = Html::tag('li', '', $options);
}
return Html::tag('ol', implode("\n", $indicators), ['class' => 'carousel-indicators']);
}
@ -111,6 +111,7 @@ class Carousel extends Widget
for ($i = 0, $count = count($this->items); $i < $count; $i++) {
$items[] = $this->renderItem($this->items[$i], $i);
}
return Html::tag('div', implode("\n", $items), ['class' => 'carousel-inner']);
}

1
Collapse.php

@ -59,7 +59,6 @@ class Collapse extends Widget
*/
public $items = [];
/**
* Initializes the widget.
*/

3
Modal.php

@ -82,7 +82,6 @@ class Modal extends Widget
*/
public $toggleButton;
/**
* Initializes the widget.
*/
@ -174,6 +173,7 @@ class Modal extends Widget
if ($tag === 'button' && !isset($this->toggleButton['type'])) {
$this->toggleButton['type'] = 'button';
}
return Html::tag($tag, $label, $this->toggleButton);
} else {
return null;
@ -192,6 +192,7 @@ class Modal extends Widget
if ($tag === 'button' && !isset($this->closeButton['type'])) {
$this->closeButton['type'] = 'button';
}
return Html::tag($tag, $label, $this->closeButton);
} else {
return null;

3
Nav.php

@ -89,7 +89,6 @@ class Nav extends Widget
*/
public $params;
/**
* Initializes the widget.
*/
@ -208,8 +207,10 @@ class Nav extends Widget
}
}
}
return true;
}
return false;
}
}

1
NavBar.php

@ -149,6 +149,7 @@ class NavBar extends Widget
{
$bar = Html::tag('span', '', ['class' => 'icon-bar']);
$screenReader = "<span class=\"sr-only\">{$this->screenReaderToggleText}</span>";
return Html::button("{$screenReader}\n{$bar}\n{$bar}\n{$bar}", [
'class' => 'navbar-toggle',
'data-toggle' => 'collapse',

3
Progress.php

@ -89,7 +89,6 @@ class Progress extends Widget
*/
public $bars;
/**
* Initializes the widget.
* If you override this method, make sure you call the parent implementation first.
@ -130,6 +129,7 @@ class Progress extends Widget
$options = ArrayHelper::getValue($bar, 'options', []);
$bars[] = $this->renderBar($bar['percent'], $label, $options);
}
return implode("\n", $bars);
}
@ -158,6 +158,7 @@ class Progress extends Widget
'class' => 'sr-only'
]);
$out .= Html::endTag('div');
return $out;
}
}

3
Tabs.php

@ -100,7 +100,6 @@ class Tabs extends Widget
*/
public $navType = 'nav-tabs';
/**
* Initializes the widget.
*/
@ -186,6 +185,7 @@ class Tabs extends Widget
return true;
}
}
return false;
}
@ -226,6 +226,7 @@ class Tabs extends Widget
unset($item);
}
return $itemActive;
}
}

1
Widget.php

@ -39,7 +39,6 @@ class Widget extends \yii\base\Widget
*/
public $clientEvents = [];
/**
* Initializes the widget.
* This method will register the bootstrap asset bundle. If you override this method,

Loading…
Cancel
Save