Skip to content

Commit

Permalink
Merge pull request #42 from imsamurai/master
Browse files Browse the repository at this point in the history
Fix Strict (2048): Declaration of BootstrapFormHelper::radio() should be...
  • Loading branch information
beporter committed Jan 20, 2014
2 parents 0809db3 + 237b92d commit 6b8bc67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Test/Case/View/Helper/BootstrapHelperTest.php
Expand Up @@ -35,7 +35,7 @@ public function getAttribute($attribute) {
/**
* Overwriting method to return a static string.
*/
public function _flash_content($key) {
public function _flash_content($key = 'flash') {
return "Flash content";
}
}
Expand Down
5 changes: 3 additions & 2 deletions View/Helper/BootstrapFormHelper.php
Expand Up @@ -344,10 +344,11 @@ public function _helpMarkup($options) {
* markup for twitter bootstrap styles
*
* @param array $options
* @param array $attributes
* @access public
* @return string
*/
public function radio($field, $options = array()) {
public function radio($field, $options = array(), $attributes = array()) {
if (is_array($field)) {
$options = $field;
} else {
Expand All @@ -364,7 +365,7 @@ public function radio($field, $options = array()) {
$input = parent::radio(
$options["field"],
array($key => $val),
array("label" => false, 'hiddenField' => $hiddenField)
$attributes + array("label" => false, 'hiddenField' => $hiddenField)
);
$id = array();
preg_match_all("/id=\"[a-zA-Z0-9_-]*\"/", $input, $id);
Expand Down

0 comments on commit 6b8bc67

Please sign in to comment.