ResponseWebSocket::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 3
1
<?php
2
namespace Fructify\Reload\Response;
3
4
use Symfony\Component\HttpFoundation;
5
6
/**
7
 * Description of Request
8
 *
9
 * @author ricky
10
 */
11
class ResponseWebSocket extends HttpFoundation\Response
12
{
13
    public function __construct($content = '', $status = 101, $headers = array())
14
    {
15
        parent::__construct($content, $status, $headers);
16
        $this->headers->set('Connection', 'Upgrade');
17
        $this->headers->set('Upgrade', 'websocket');
18
        $this->headers->remove('Content-Length');
19
        $this->headers->remove('Cache-Control');
20
        $this->headers->remove('Date');
21
    }
22
}
23