/** * @return string */ public function usage() { $result = $this->name . ' - ' . $this->getDescription() . PHP_EOL . PHP_EOL . 'Usage' . PHP_EOL . ' ' . \Nano\Cli::getPhpBinary() . ' ' . \Nano\Cli::getCliScriptPath() . ' ' . $this->name; $params = ''; foreach ($this->getDocTags() as $tag) { if ('param' !== $tag['name']) { continue; } $result .= ' ' . $tag['param']; $params .= ' - ' . $tag['optional'] . ' ' . $tag['param'] . ' ' . $tag['description'] . PHP_EOL; } return $result . PHP_EOL . (empty($params) ? '' : PHP_EOL . ' Where' . PHP_EOL . $params) . PHP_EOL; }
/** * @return string */ protected function getWindowsScriptSource() { return '@echo off' . PHP_EOL . \Nano\Cli::getPhpBinary() . ' ' . \Nano\Cli::getCliScriptPath() . ' %*'; }