Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

Fixed controller creation check #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ZFTool/Controller/CreateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public function controllerAction()
"The path $path doesn't contain a ZF2 application. I cannot create a module here."
);
}
if (file_exists("$path/module/$module/src/$module/Controller/$name")) {
$ucName = ucfirst($name);
if (file_exists("$path/module/$module/src/$module/Controller/{$ucName}Controller.php")) {
return $this->sendError(
"The controller $name already exists in module $module."
"The controller {$ucName}Controller already exists in module $module."
);
}

$ucName = ucfirst($name);
$ctrlPath = $path . '/module/' . $module . '/src/' . $module . '/Controller/' . $ucName.'Controller.php';
$controller = $ucName . 'Controller';

Expand Down