Completed
Push — develop ( 3a3dc6...197df4 )
by Stan
02:03
created

Http2Push   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 53
ccs 11
cts 11
cp 1
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 8
    public function __construct(Collection $resources, Cookie $cookie, string $link)
33
    {
34 8
        $this->resources = $resources;
35 8
        $this->cookie = $cookie;
36 8
        $this->link = $link;
37 8
    }
38
39
    /**
40
     * @return Collection
41
     */
42 1
    public function getResources(): Collection
43
    {
44 1
        return $this->resources;
45
    }
46
47
    /**
48
     * @return Cookie
49
     */
50 6
    public function getCookie(): Cookie
51
    {
52 6
        return $this->cookie;
53
    }
54
55
    /**
56
     * @return string
57
     */
58 7
    public function getLink(): string
59
    {
60 7
        return $this->link;
61
    }
62
}
63