WsRequest::__get()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 1
1
<?php
2
3
namespace Shamaseen\Laravel\Ratchet\Requests;
4
class WsRequest extends \Illuminate\Support\Collection
5
{
6
    public function __construct($items = [])
7
    {
8
        unset($items['session']);
9
        parent::__construct($items);
10
11
        $this->put('route',$this->get('route'));
12
        $this->forget('route');
13
    }
14
15
    public function __get($property)
16
    {
17
        if($this->has($property))
18
            return $this->get($property);
19
20
        return Parent::get($property);
21
    }
22
}
23