Skip to content

Commit 1b23a24

Browse files
committed
some update
1 parent 4fcde17 commit 1b23a24

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

src/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ public function runAction($name, $action, $believable = false, $standAlone = fal
249249
}
250250

251251
$object::setName($name);
252-
$object->delimiter = $this->delimiter;
253252
$object->setApp($this);
253+
$object->setDelimiter($this->delimiter);
254254
$object->setStandAlone($standAlone);
255255

256256
return $object->setAction($action)->run();

src/Controller.php

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ abstract class Controller extends AbstractCommand implements ControllerInterface
3434
protected $notFoundCallback = 'notFound';
3535

3636
/** @var string */
37-
public $delimiter = ':'; // '/' ':'
38-
39-
/** @var bool */
40-
protected $showMore = true;
37+
protected $delimiter = ':'; // '/' ':'
4138

4239
/** @var bool */
4340
private $standAlone = false;
@@ -195,7 +192,10 @@ final protected function showCommandList()
195192
],
196193
]);
197194

198-
$this->showMore && $this->write("More information please use: <cyan>$script {$name}{command} -h</cyan>");
195+
$this->write(sprintf(
196+
"To see more information about a command, please use: <cyan>$script {command} -h</cyan>",
197+
$this->standAlone ? ' ' . $name : ''
198+
));
199199
}
200200

201201
/**************************************************************************
@@ -287,4 +287,19 @@ public function setStandAlone($standAlone = true)
287287
$this->standAlone = (bool)$standAlone;
288288
}
289289

290+
/**
291+
* @return string
292+
*/
293+
public function getDelimiter(): string
294+
{
295+
return $this->delimiter;
296+
}
297+
298+
/**
299+
* @param string $delimiter
300+
*/
301+
public function setDelimiter(string $delimiter)
302+
{
303+
$this->delimiter = $delimiter;
304+
}
290305
}

0 commit comments

Comments
 (0)