Skip to content

Commit

Permalink
Cleanup method calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Jun 20, 2015
1 parent 1d03d5b commit 6e5381a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -279,12 +279,12 @@ public function meta($type, $url = null, $options = array()) {
if (isset($options['link'])) {
$options['link'] = $this->assetUrl($options['link']);
if (isset($options['rel']) && $options['rel'] === 'icon') {
$out = sprintf($this->_tags['metalink'], $options['link'], $this->_parseAttributes($options, array('block', 'link'), ' ', ' '));
$out = sprintf($this->_tags['metalink'], $options['link'], $this->_parseAttributes($options, array('block', 'link')));
$options['rel'] = 'shortcut icon';
}
$out .= sprintf($this->_tags['metalink'], $options['link'], $this->_parseAttributes($options, array('block', 'link'), ' ', ' '));
$out .= sprintf($this->_tags['metalink'], $options['link'], $this->_parseAttributes($options, array('block', 'link')));
} else {
$out = sprintf($this->_tags['meta'], $this->_parseAttributes($options, array('block', 'type'), ' ', ' '));
$out = sprintf($this->_tags['meta'], $this->_parseAttributes($options, array('block', 'type')));
}

if (empty($options['block'])) {
Expand Down Expand Up @@ -565,7 +565,7 @@ public function script($url, $options = array()) {
$url = str_replace(Configure::read('App.jsBaseUrl'), 'cjs/', $url);
}
}
$attributes = $this->_parseAttributes($options, array('block', 'once'), ' ');
$attributes = $this->_parseAttributes($options, array('block', 'once'));
$out = sprintf($this->_tags['javascriptlink'], $url, $attributes);

if (empty($options['block'])) {
Expand Down Expand Up @@ -601,7 +601,7 @@ public function scriptBlock($script, $options = array()) {
}
unset($options['inline'], $options['safe']);

$attributes = $this->_parseAttributes($options, array('block'), ' ');
$attributes = $this->_parseAttributes($options, array('block'));
$out = sprintf($this->_tags['javascriptblock'], $attributes, $script);

if (empty($options['block'])) {
Expand Down Expand Up @@ -828,7 +828,7 @@ public function image($path, $options = array()) {
unset($options['url']);
}

$image = sprintf($this->_tags['image'], $path, $this->_parseAttributes($options, null, ' ', ' '));
$image = sprintf($this->_tags['image'], $path, $this->_parseAttributes($options));

if ($url) {
return sprintf($this->_tags['link'], $this->url($url), null, $image);
Expand Down Expand Up @@ -939,7 +939,7 @@ public function tag($name, $text = null, $options = array()) {
} else {
$tag = 'tag';
}
return sprintf($this->_tags[$tag], $name, $this->_parseAttributes($options, null, ' ', ''), $text, $name);
return sprintf($this->_tags[$tag], $name, $this->_parseAttributes($options), $text, $name);
}

/**
Expand All @@ -957,7 +957,7 @@ public function useTag($tag) {
array_shift($args);
foreach ($args as &$arg) {
if (is_array($arg)) {
$arg = $this->_parseAttributes($arg, null, ' ', '');
$arg = $this->_parseAttributes($arg);
}
}
return vsprintf($this->_tags[$tag], $args);
Expand Down Expand Up @@ -1008,7 +1008,7 @@ public function para($class, $text, $options = array()) {
if ($text === null) {
$tag = 'parastart';
}
return sprintf($this->_tags[$tag], $this->_parseAttributes($options, null, ' ', ''), $text);
return sprintf($this->_tags[$tag], $this->_parseAttributes($options), $text);
}

/**
Expand Down Expand Up @@ -1144,7 +1144,7 @@ public function nestedList($list, $options = array(), $itemOptions = array(), $t
$options = array();
}
$items = $this->_nestedListItem($list, $options, $itemOptions, $tag);
return sprintf($this->_tags[$tag], $this->_parseAttributes($options, null, ' ', ''), $items);
return sprintf($this->_tags[$tag], $this->_parseAttributes($options), $items);
}

/**
Expand All @@ -1170,7 +1170,7 @@ protected function _nestedListItem($items, $options, $itemOptions, $tag) {
} elseif (isset($itemOptions['odd']) && $index % 2 !== 0) {
$itemOptions['class'] = $itemOptions['odd'];
}
$out .= sprintf($this->_tags['li'], $this->_parseAttributes($itemOptions, array('even', 'odd'), ' ', ''), $item);
$out .= sprintf($this->_tags['li'], $this->_parseAttributes($itemOptions, array('even', 'odd')), $item);
$index++;
}
return $out;
Expand Down

0 comments on commit 6e5381a

Please sign in to comment.