@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); |
83 | 83 | }); |
84 | 84 | |
85 | - if (!class_exists('Spiral\RoadRunnerBridge\Http\Dispatcher')) { |
|
86 | - if (class_exists(PSR7Client::class)) { |
|
85 | + if (!class_exists('Spiral\RoadRunnerBridge\Http\Dispatcher')){ |
|
86 | + if (class_exists(PSR7Client::class)){ |
|
87 | 87 | $kernel->addDispatcher($factory->make(LegacyRrDispatcher::class)); |
88 | 88 | } |
89 | 89 | |
90 | - if (class_exists(PSR7Worker::class)) { |
|
90 | + if (class_exists(PSR7Worker::class)){ |
|
91 | 91 | $kernel->addDispatcher($factory->make(RrDispatcher::class)); |
92 | 92 | } |
93 | 93 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | $emitter = new SapiEmitter(); |
133 | 133 | |
134 | - if (($chunkSize = $config->getChunkSize()) !== null) { |
|
134 | + if (($chunkSize = $config->getChunkSize()) !== null){ |
|
135 | 135 | $emitter->bufferSize = $chunkSize; |
136 | 136 | } |
137 | 137 |
@@ -82,12 +82,15 @@ discard block |
||
82 | 82 | $kernel->addDispatcher($factory->make(SapiDispatcher::class)); |
83 | 83 | }); |
84 | 84 | |
85 | - if (!class_exists('Spiral\RoadRunnerBridge\Http\Dispatcher')) { |
|
86 | - if (class_exists(PSR7Client::class)) { |
|
85 | + if (!class_exists('Spiral\RoadRunnerBridge\Http\Dispatcher')) |
|
86 | + { |
|
87 | + if (class_exists(PSR7Client::class)) |
|
88 | + { |
|
87 | 89 | $kernel->addDispatcher($factory->make(LegacyRrDispatcher::class)); |
88 | 90 | } |
89 | 91 | |
90 | - if (class_exists(PSR7Worker::class)) { |
|
92 | + if (class_exists(PSR7Worker::class)) |
|
93 | + { |
|
91 | 94 | $kernel->addDispatcher($factory->make(RrDispatcher::class)); |
92 | 95 | } |
93 | 96 | } |
@@ -131,7 +134,8 @@ discard block |
||
131 | 134 | { |
132 | 135 | $emitter = new SapiEmitter(); |
133 | 136 | |
134 | - if (($chunkSize = $config->getChunkSize()) !== null) { |
|
137 | + if (($chunkSize = $config->getChunkSize()) !== null) |
|
138 | + { |
|
135 | 139 | $emitter->bufferSize = $chunkSize; |
136 | 140 | } |
137 | 141 |
@@ -60,10 +60,10 @@ |
||
60 | 60 | */ |
61 | 61 | public function getChunkSize(): ?int |
62 | 62 | { |
63 | - if (\is_null($this->config['chunkSize']) || (int) $this->config['chunkSize'] <= 0) { |
|
63 | + if (\is_null($this->config['chunkSize']) || (int)$this->config['chunkSize'] <= 0){ |
|
64 | 64 | return null; |
65 | 65 | } |
66 | 66 | |
67 | - return (int) $this->config['chunkSize']; |
|
67 | + return (int)$this->config['chunkSize']; |
|
68 | 68 | } |
69 | 69 | } |
@@ -60,7 +60,8 @@ |
||
60 | 60 | */ |
61 | 61 | public function getChunkSize(): ?int |
62 | 62 | { |
63 | - if (\is_null($this->config['chunkSize']) || (int) $this->config['chunkSize'] <= 0) { |
|
63 | + if (\is_null($this->config['chunkSize']) || (int) $this->config['chunkSize'] <= 0) |
|
64 | + { |
|
64 | 65 | return null; |
65 | 66 | } |
66 | 67 |