HttpServer::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
1
<?php
2
3
namespace BeyondCode\LaravelWebSockets\Server;
4
5
use Ratchet\Http\HttpServer as BaseHttpServer;
6
use Ratchet\Http\HttpServerInterface;
7
8
class HttpServer extends BaseHttpServer
9
{
10
    /**
11
     * Create a new server instance.
12
     *
13
     * @param  \Ratchet\Http\HttpServerInterface  $component
14
     * @param  int  $maxRequestSize
15
     * @return void
16
     */
17
    public function __construct(HttpServerInterface $component, int $maxRequestSize = 4096)
18
    {
19
        parent::__construct($component);
20
21
        $this->_reqParser->maxSize = $maxRequestSize;
22
    }
23
}
24