Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Commit

Permalink
Remove unnecessary implode parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Feb 21, 2016
1 parent f06f4fd commit 0884660
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/AdamWathan/Form/Elements/Element.php
Expand Up @@ -105,7 +105,7 @@ public function __toString()

protected function renderAttributes()
{
return implode('', array_map(function ($attribute, $value) {
return implode(array_map(function ($attribute, $value) {
return sprintf(' %s="%s"', $attribute, $value);
}, array_keys($this->attributes), $this->attributes));
}
Expand Down
2 changes: 1 addition & 1 deletion src/AdamWathan/Form/Elements/FormOpen.php
Expand Up @@ -25,7 +25,7 @@ public function render()
$tags[] = $this->hiddenMethod->render();
}

return implode('', $tags);
return implode($tags);
}

protected function hasToken()
Expand Down
2 changes: 1 addition & 1 deletion src/AdamWathan/Form/Elements/Label.php
Expand Up @@ -31,7 +31,7 @@ public function render()

$tags[] = '</label>';

return implode('', $tags);
return implode($tags);
}

public function forId($name)
Expand Down
10 changes: 5 additions & 5 deletions src/AdamWathan/Form/Elements/Select.php
Expand Up @@ -35,7 +35,7 @@ public function options($options)

public function render()
{
return implode('', [
return implode([
sprintf('<select%s>', $this->renderAttributes()),
$this->renderOptions(),
'</select>',
Expand All @@ -51,7 +51,7 @@ protected function renderOptions()
return $this->renderOption($value, $label);
}, array_keys($this->options), $this->options);

return implode('', $tags);
return implode($tags);
}

protected function renderOptGroup($label, $options)
Expand All @@ -60,16 +60,16 @@ protected function renderOptGroup($label, $options)
return $this->renderOption($value, $label);
}, array_keys($options), $options);

return implode('', [
return implode([
sprintf('<optgroup label="%s">', $label),
implode('', $options),
implode($options),
'</optgroup>',
]);
}

protected function renderOption($value, $label)
{
return implode('', [
return implode([
sprintf('<option value="%s"%s>', $value, $this->isSelected($value) ? ' selected' : ''),
$label,
'</option>',
Expand Down
2 changes: 1 addition & 1 deletion src/AdamWathan/Form/Elements/TextArea.php
Expand Up @@ -14,7 +14,7 @@ class TextArea extends FormControl

public function render()
{
return implode('', [
return implode([
sprintf('<textarea%s>', $this->renderAttributes()),
$this->value,
'</textarea>',
Expand Down

0 comments on commit 0884660

Please sign in to comment.