Example #1
0
 /**
  * @inheritdoc
  */
 public function allowed(Config $config, ArrayAccess $paths)
 {
     $this->actionSource = $this->action($this->url, $paths);
     if (empty($this->actionSource[0])) {
         $this->io->error("{$this->url} is not a valid url nor a valid path.");
         return false;
     }
     return true;
 }
Example #2
0
 /**
  * Print messages to console line by line.
  *
  * @param string $message
  * @param bool   $error
  */
 private function printMessages($message, $error = false)
 {
     $messages = explode(PHP_EOL, $message);
     foreach ($messages as $line) {
         $error ? $this->io->error($line) : $this->io->ok($line);
     }
 }