| @@ -2,17 +2,12 @@ | ||
| 2 | 2 | namespace Laravoole; | 
| 3 | 3 | |
| 4 | 4 | use Exception; | 
| 5 | -use ErrorException; | |
| 6 | - | |
| 7 | 5 | use swoole_http_request; | 
| 8 | - | |
| 9 | 6 | use Laravoole\Illuminate\Application; | 
| 10 | 7 | use Laravoole\Illuminate\Request as IlluminateRequest; | 
| 11 | - | |
| 12 | 8 | use Illuminate\Support\Facades\Facade; | 
| 13 | 9 | use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; | 
| 14 | 10 | use Psr\Http\Message\ServerRequestInterface; | 
| 15 | - | |
| 16 | 11 | use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; | 
| 17 | 12 | use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory; | 
| 18 | 13 | |
| @@ -3,9 +3,7 @@ | ||
| 3 | 3 | namespace Laravoole\Commands; | 
| 4 | 4 | |
| 5 | 5 | use ReflectionClass; | 
| 6 | - | |
| 7 | 6 | use Illuminate\Console\Command; | 
| 8 | -use Symfony\Component\Console\Input\InputOption; | |
| 9 | 7 | |
| 10 | 8 | class LaravooleCommand extends Command | 
| 11 | 9 |  { | 
| @@ -6,7 +6,6 @@ | ||
| 6 | 6 | use Illuminate\Support\Str; | 
| 7 | 7 | use Symfony\Component\HttpKernel\Exception\HttpException; | 
| 8 | 8 | use Illuminate\Broadcasting\Broadcasters\Broadcaster; | 
| 9 | - | |
| 10 | 9 | use Laravoole\LaravooleFacade; | 
| 11 | 10 | |
| 12 | 11 | class LaravooleBroadcaster extends Broadcaster | 
| @@ -1,10 +1,7 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | namespace Laravoole\Wrapper; | 
| 3 | 3 | |
| 4 | -use swoole_http_server; | |
| 5 | - | |
| 6 | 4 | use Laravoole\Base; | 
| 7 | -use Exception; | |
| 8 | 5 | |
| 9 | 6 | abstract class Swoole extends Base | 
| 10 | 7 |  { | 
| @@ -3,8 +3,6 @@ | ||
| 3 | 3 | |
| 4 | 4 | use swoole_http_server; | 
| 5 | 5 | |
| 6 | -use Symfony\Component\HttpFoundation\BinaryFileResponse; | |
| 7 | - | |
| 8 | 6 | class SwooleHttpWrapper extends Swoole implements ServerInterface | 
| 9 | 7 |  { | 
| 10 | 8 | use HttpTrait; | 
| @@ -4,15 +4,11 @@ | ||
| 4 | 4 | use swoole_websocket_server; | 
| 5 | 5 | use swoole_http_request; | 
| 6 | 6 | use swoole_http_response; | 
| 7 | -use swoole_process; | |
| 8 | - | |
| 9 | 7 | use Laravoole\Request; | 
| 10 | 8 | use Laravoole\Response; | 
| 11 | 9 | use Laravoole\WebsocketCodec\Json; | 
| 12 | 10 | use Laravoole\WebsocketCodec\JsonRpc; | 
| 13 | 11 | |
| 14 | -use Symfony\Component\HttpFoundation\BinaryFileResponse; | |
| 15 | - | |
| 16 | 12 | class SwooleWebSocketWrapper extends SwooleHttpWrapper implements ServerInterface | 
| 17 | 13 |  { | 
| 18 | 14 | protected $defaultProtocol; | 
| @@ -3,7 +3,6 @@ | ||
| 3 | 3 | |
| 4 | 4 | use Laravoole\Base; | 
| 5 | 5 | use Exception; | 
| 6 | -use Workerman\Worker; | |
| 7 | 6 | |
| 8 | 7 | abstract class Workerman extends Base implements ServerInterface | 
| 9 | 8 |  { | 
| @@ -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(); |