Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
z-song committed Aug 17, 2016
1 parent d249824 commit 6368a13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/Command.php
Expand Up @@ -89,12 +89,14 @@ public function handleArguments()
$this->host = $value;
} else {
$this->usage();

return false;
}
break;

case 'help':
$this->usage();

return false;

case 'p':
Expand All @@ -117,6 +119,7 @@ public function handleArguments()
case 'v':
case 'version':
echo Server::VERSION, "\r\n";

return false;

default:
Expand Down Expand Up @@ -165,7 +168,6 @@ public function usage()
Other options please see http://wiki.swoole.com/wiki/page/274.html.
TYPEOTHER;

}
Expand Down Expand Up @@ -233,7 +235,7 @@ public function restart()
*
* @throws \Exception
*
* @return bool|string
* @return string|false
*/
protected function getPid()
{
Expand Down
9 changes: 4 additions & 5 deletions src/Server.php
Expand Up @@ -21,7 +21,7 @@ class Server
protected $host = '127.0.0.1';

/**
* @var string
* @var integer
*/
protected $port = 8083;

Expand Down Expand Up @@ -90,8 +90,8 @@ class Server
/**
* Create a new Server instance.
*
* @param string $host
* @param string $port
* @param string $host
* @param integer $port
*/
public function __construct($host = '127.0.0.1', $port = 8083)
{
Expand Down Expand Up @@ -273,9 +273,8 @@ public function onStart($server)
/**
* Server shutdown event callback.
*
* @param $server
*/
public function onShutdown($server)
public function onShutdown()
{
unlink($this->pidFile);
}
Expand Down

0 comments on commit 6368a13

Please sign in to comment.