Skip to content

Commit

Permalink
Make method name better represent what it is going to do.
Browse files Browse the repository at this point in the history
Refs #5002
  • Loading branch information
markstory committed Oct 30, 2014
1 parent 9b4ea64 commit daf73ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Core/ConventionsTrait.php
Expand Up @@ -80,7 +80,7 @@ protected function _singularName($name) {
* @param string $name Name to use
* @return string Plural name for views
*/
protected function _pluralName($name) {
protected function _variableName($name) {
return Inflector::variable($name);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Shell/Task/ControllerTask.php
Expand Up @@ -90,10 +90,10 @@ public function bakeActions($controllerName) {

$modelObj = TableRegistry::get($currentModelName);

$pluralName = $this->_pluralName($currentModelName);
$pluralName = $this->_variableName($currentModelName);
$singularName = $this->_singularName($currentModelName);
$singularHumanName = $this->_singularHumanName($controllerName);
$pluralHumanName = $this->_pluralName($controllerName);
$pluralHumanName = $this->_variableName($controllerName);

$this->Template->set(compact(
'plugin', 'admin', 'pluralName', 'singularName',
Expand Down
4 changes: 2 additions & 2 deletions src/Template/Bake/default/actions/controller_actions.ctp
Expand Up @@ -82,7 +82,7 @@ $allAssociations = array_merge(
foreach ($editAssociations as $assoc):
$association = $modelObj->association($assoc);
$otherName = $association->target()->alias();
$otherPlural = $this->_pluralName($otherName);
$otherPlural = $this->_variableName($otherName);
echo "\t\t\${$otherPlural} = \$this->{$currentModelName}->{$otherName}->find('list');\n";
$compact[] = "'{$otherPlural}'";
endforeach;
Expand Down Expand Up @@ -115,7 +115,7 @@ $allAssociations = array_merge(
foreach ($editAssociations as $assoc):
$association = $modelObj->association($assoc);
$otherName = $association->target()->alias();
$otherPlural = $this->_pluralName($otherName);
$otherPlural = $this->_variableName($otherName);
echo "\t\t\${$otherPlural} = \$this->{$currentModelName}->{$otherName}->find('list');\n";
$compact[] = "'{$otherPlural}'";
endforeach;
Expand Down

0 comments on commit daf73ef

Please sign in to comment.