Skip to content

Commit

Permalink
fix: some flags error on built in command method comments
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 22, 2021
1 parent 0524147 commit fb34f32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions src/BuiltIn/DevServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ public static function aliases(): array
* {command} [-H HOST] [-p PORT]
* {command} [-S HOST:PORT] [file=]web/index.php
* @options
* -s, -S, --addr STRING The http server address. e.g 127.0.0.1:8552
* -t, --doc-root STRING The document root dir for server(<comment>public</comment>)
* -H,--host STRING The server host address(<comment>127.0.0.1</comment>)
* -p,--port INTEGER The server port number(<comment>8552</comment>)
* -b,--php-bin STRING The php binary file(<comment>php</comment>)
* -s, -S, --addr The http server address. e.g 127.0.0.1:8552
* -t, --doc-root The document root dir for server(<comment>public</comment>)
* -H,--host The server host address(<comment>127.0.0.1</comment>)
* -p,--port The server port number(<comment>8552</comment>)
* -b,--php-bin The php binary file(<comment>php</comment>)
* @arguments
* file=STRING The entry file for server. e.g web/index.php
*
* @param Input $input
* @param Output $output
*
* @return int|mixed|void
* @return void
* @throws Exception
* @example
* {command} -S 127.0.0.1:8552 web/index.php
*/
#[CmdOption('dev-serve', 'start a php built-in http server for developmentd')]
public function execute($input, $output)
public function execute(Input $input, Output $output)
{
$serveAddr = $input->getSameStringOpt('s,S,addr');
if (!$serveAddr) {
Expand Down
28 changes: 14 additions & 14 deletions src/BuiltIn/PharController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ protected function packConfigure(Input $input): void
* @usage {fullCommand} [--dir DIR] [--output FILE] [...]
*
* @options
* -d, --dir STRING Setting the project directory for packing.
* default is current work-dir(default: <cyan>{workDir}</cyan>)
* -c, --config STRING Use the custom config file for build phar(default: <cyan>./phar.build.inc</cyan>)
* -o, --output STRING Setting the output file name(<cyan>{defaultPkgName}</cyan>)
* --fast Fast build. only add modified files by <cyan>git status -s</cyan>
* --refresh Whether build vendor folder files on phar file exists(<cyan>False</cyan>)
* --files STRING Only pack the list files to the exist phar, multi use ',' split
* --no-progress Disable output progress on the runtime
* -d, --dir Setting the project directory for packing.
* default is current work-dir(default: <cyan>{workDir}</cyan>)
* -c, --config Use the custom config file for build phar(default: <cyan>./phar.build.inc</cyan>)
* -o, --output Setting the output file name(<cyan>{defaultPkgName}</cyan>)
* --fast bool;Fast build. only add modified files by <cyan>git status -s</cyan>
* --refresh bool;Whether build vendor folder files on phar file exists(<cyan>False</cyan>)
* --files Only pack the list files to the exist phar, multi use ',' split
* --no-progress bool;Disable output progress on the runtime
*
* @param Input $input
* @param Output $output
*
* @return int
* @throws Exception
* @example
* {fullCommand} Pack current dir to a phar file.
* {fullCommand} --dir vendor/swoft/devtool Pack the specified dir to a phar file.
* {fullCommand} Pack current dir to a phar file.
* {fullCommand} --dir vendor/swoft/devtool Pack the specified dir to a phar file.
*
* custom output phar file name
* php -d phar.readonly=0 {binFile} phar:pack -o=mycli.phar
Expand Down Expand Up @@ -223,10 +223,10 @@ public function setCompilerConfiger(Closure $compilerConfiger): void
* @usage {fullCommand} -f FILE [-d DIR]
*
* @options
* -f, --file STRING The packed phar file path
* -d, --dir STRING The output dir on extract phar package.
* -y, --yes BOOL Whether display goon tips message.
* --overwrite BOOL Whether overwrite exists files on extract phar
* -f, --file The packed phar file path
* -d, --dir The output dir on extract phar package.
* -y, --yes bool;Whether display goon tips message.
* --overwrite bool;Whether overwrite exists files on extract phar
*
* @param Input $in
* @param Output $out
Expand Down

0 comments on commit fb34f32

Please sign in to comment.