Passed
Push — develop ( 6e78c9...4aabf2 )
by Stan
04:01 queued 22s
created

Http2Push   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getResources() 0 3 1
A getCookie() 0 3 1
A __construct() 0 5 1
A getLink() 0 3 1
1
<?php
2
3
namespace Krenor\Http2Pusher;
4
5
use Illuminate\Support\Collection;
6
use Symfony\Component\HttpFoundation\Cookie;
7
8
class Http2Push
9
{
10
    /**
11
     * @var Collection
12
     */
13
    protected $resources;
14
15
    /**
16
     * @var Cookie
17
     */
18
    protected $cookie;
19
20
    /**
21
     * @var string
22
     */
23
    protected $link;
24
25
    /**
26
     * PushableResource constructor.
27
     *
28
     * @param Collection $resources
29
     * @param Cookie $cookie
30
     * @param string $link
31
     */
32
    public function __construct(Collection $resources, Cookie $cookie, string $link)
33
    {
34
        $this->resources = $resources;
35
        $this->cookie = $cookie;
36
        $this->link = $link;
37
    }
38
39
    /**
40
     * @return Collection
41
     */
42
    public function getResources(): Collection
43
    {
44
        return $this->resources;
45
    }
46
47
    /**
48
     * @return Cookie
49
     */
50
    public function getCookie(): Cookie
51
    {
52
        return $this->cookie;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getLink(): string
59
    {
60
        return $this->link;
61
    }
62
}
63