Skip to content

Commit

Permalink
Remove stupid parameter names.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 22, 2013
1 parent d5805e1 commit 9ace664
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/Cake/Utility/ViewVarsTrait.php
Expand Up @@ -33,21 +33,21 @@ trait ViewVarsTrait {
/**
* Saves a variable for use inside a template.
*
* @param string|array $one A string or an array of data.
* @param string|array $two Value in case $one is a string (which then works as the key).
* Unused if $one is an associative array, otherwise serves as the values to $one's keys.
* @param string|array $name A string or an array of data.
* @param string|array $val Value in case $name is a string (which then works as the key).
* Unused if $name is an associative array, otherwise serves as the values to $name's keys.
* @return void
* @link http://book.cakephp.org/2.0/en/controllers.html#interacting-with-views
*/
public function set($one, $two = null) {
if (is_array($one)) {
if (is_array($two)) {
$data = array_combine($one, $two);
public function set($name, $val = null) {
if (is_array($name)) {
if (is_array($val)) {
$data = array_combine($name, $val);
} else {
$data = $one;
$data = $name;
}
} else {
$data = [$one => $two];
$data = [$name => $val];
}
$this->viewVars = $data + $this->viewVars;
}
Expand Down

0 comments on commit 9ace664

Please sign in to comment.