/**
  * Create row data for the table depending on the ping result.
  *
  * @param Server $server
  * @return array
  */
 private function getPingRowData($server)
 {
     $data = [sprintf("<comment>%s</comment>", $server->getDisplayName()), sprintf("<comment>%s</comment>", $server->getName())];
     if ($ping = $server->ping()) {
         $data[] = $ping;
         return $data;
     }
     $data[] = '<error>Unavailable</error>';
     return $data;
 }
Esempio n. 2
0
 /**
  * @param $script
  * @param $project
  * @return string
  */
 private function scriptNotFoundError($script, $project)
 {
     $format = "<error>There is no script named '%s' associated with the '%s' project on the %s</error>";
     return sprintf($format, $script, $project, $this->server->getDisplayName());
 }