示例#1
0
 public function validate()
 {
     Validate::checkExecutable($this->getSsh(), '\\Gasp\\Exception\\Ssh\\Exception');
     if (!$this->getUsername()) {
         throw new Exception('You must define the SSH username.');
     }
     if (!$this->getHost()) {
         throw new Exception('You must define the SSH hostname.');
     }
     if (!$this->getPort()) {
         throw new Exception('You must define the SSH port.');
     }
 }
示例#2
0
文件: Rsync.php 项目: griffbrad/gasp
 public function validate()
 {
     $this->classMap->validate();
     Validate::checkExecutable($this->rsync, '\\Gasp\\Extension\\Ssh\\Exception');
 }
示例#3
0
文件: Lint.php 项目: griffbrad/gasp
 /**
  * Ensure the PHP command is available and that at least one path is defined.
  *
  * @throws Exception
  */
 public function validate()
 {
     Validate::checkExecutable($this->php, '\\Gasp\\Exception');
     if (!count($this->paths)) {
         throw new Exception('Cannot run lint task without any paths defined.');
     }
 }