@@ -75,6 +75,9 @@ |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | + /** |
|
79 | + * @param integer $sig |
|
80 | + */ |
|
78 | 81 | protected function sendSignal($sig) |
79 | 82 | { |
80 | 83 | if ($pid = $this->getPid()) { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * |
35 | 35 | * @param \Illuminate\Http\Request $request |
36 | 36 | * @param mixed $result |
37 | - * @return mixed |
|
37 | + * @return string |
|
38 | 38 | */ |
39 | 39 | public function validAuthenticationResponse($request, $result) |
40 | 40 | { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | /** |
102 | 102 | * 设置Http头信息 |
103 | - * @param $key |
|
103 | + * @param string $key |
|
104 | 104 | * @param $value |
105 | 105 | */ |
106 | 106 | public function header($key, $value) |
@@ -3,21 +3,21 @@ |
||
3 | 3 | |
4 | 4 | class Worker extends \Workerman\Worker |
5 | 5 | { |
6 | - public static function runAll() |
|
7 | - { |
|
8 | - self::checkSapiEnv(); |
|
9 | - self::init(); |
|
10 | - self::parseCommand(); |
|
11 | - self::daemonize(); |
|
12 | - self::initWorkers(); |
|
13 | - self::installSignal(); |
|
14 | - self::saveMasterPid(); |
|
15 | - self::forkWorkers(); |
|
16 | - // @codeCoverageIgnoreStart |
|
17 | - self::resetStd(); |
|
18 | - self::monitorWorkers(); |
|
19 | - // @codeCoverageIgnoreEnd |
|
20 | - } // @codeCoverageIgnore |
|
6 | + public static function runAll() |
|
7 | + { |
|
8 | + self::checkSapiEnv(); |
|
9 | + self::init(); |
|
10 | + self::parseCommand(); |
|
11 | + self::daemonize(); |
|
12 | + self::initWorkers(); |
|
13 | + self::installSignal(); |
|
14 | + self::saveMasterPid(); |
|
15 | + self::forkWorkers(); |
|
16 | + // @codeCoverageIgnoreStart |
|
17 | + self::resetStd(); |
|
18 | + self::monitorWorkers(); |
|
19 | + // @codeCoverageIgnoreEnd |
|
20 | + } // @codeCoverageIgnore |
|
21 | 21 | |
22 | 22 | protected static function parseCommand() |
23 | 23 | { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | return $illuminateResponse->getFile()->getPathname(); |
40 | 40 | }; |
41 | 41 | if ($accept_gzip && isset($response->header['Content-Type'])) { |
42 | - $size = $illuminateResponse->getFile()->getSize(); |
|
42 | + $size = $illuminateResponse->getFile()->getSize(); |
|
43 | 43 | } |
44 | 44 | } else { |
45 | 45 | $content = $illuminateResponse->getContent(); |
@@ -39,14 +39,14 @@ |
||
39 | 39 | |
40 | 40 | public function endResponse($response, $content) |
41 | 41 | { |
42 | - $connection = $response->request->getLaravooleInfo()->workermanConnection; |
|
42 | + $connection = $response->request->getLaravooleInfo()->workermanConnection; |
|
43 | 43 | if (!is_string($content)) { |
44 | - $response->content = file_get_contents($content()); |
|
44 | + $response->content = file_get_contents($content()); |
|
45 | 45 | } else { |
46 | - $response->content = $content; |
|
46 | + $response->content = $content; |
|
47 | 47 | } |
48 | 48 | $rawContent = $response->getRawContent(); |
49 | - $connection->maxSendBufferSize = strlen($rawContent); |
|
49 | + $connection->maxSendBufferSize = strlen($rawContent); |
|
50 | 50 | $connection->close($rawContent, true); |
51 | 51 | } |
52 | 52 | } |