Skip to content

Commit

Permalink
Avoid using empty function.
Browse files Browse the repository at this point in the history
  • Loading branch information
alysson committed May 26, 2016
1 parent 08e51e1 commit e47acf1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Shell/CommandListShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CommandListShell extends Shell
*/
public function startup()
{
if (empty($this->params['xml']) && empty($this->params['version'])) {
if (!$this->param('xml') && !$this->param('version')) {
parent::startup();
}
}
Expand All @@ -54,7 +54,7 @@ public function startup()
*/
public function main()
{
if (empty($this->params['xml']) && empty($this->params['version'])) {
if (!$this->param('xml') && !$this->param('version')) {
$this->out("<info>Current Paths:</info>", 2);
$this->out("* app: " . APP_DIR);
$this->out("* root: " . rtrim(ROOT, DIRECTORY_SEPARATOR));
Expand All @@ -64,17 +64,17 @@ public function main()
$this->out("<info>Available Shells:</info>", 2);
}

if (!empty($this->params['version'])) {
if ($this->param('version')) {
$this->out(Configure::version());
return;
}

$shellList = $this->Command->getShellList();
if (empty($shellList)) {
if (!$shellList) {
return;
}

if (empty($this->params['xml'])) {
if (!$this->param('xml')) {
$this->_asText($shellList);
} else {
$this->_asXml($shellList);
Expand Down

0 comments on commit e47acf1

Please sign in to comment.