Browse Source

Avoid using empty function.

alysson 10 years ago
parent
commit
e47acf152c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/Shell/CommandListShell.php

+ 5 - 5
src/Shell/CommandListShell.php

@@ -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();
         }
     }
@@ -54,7 +54,7 @@ class CommandListShell extends Shell
      */
     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));
@@ -64,17 +64,17 @@ class CommandListShell extends Shell
             $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);