Page::getUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace MediaMonks\Crawler;
4
5
use Symfony\Component\BrowserKit\Response;
6
use Symfony\Component\DomCrawler\Crawler as DomCrawler;
7
8
class Page
9
{
10
    /**
11
     * @var Url
12
     */
13
    private $url;
14
15
    /**
16
     * @var DomCrawler
17
     */
18
    private $crawler;
19
20
    /**
21
     * @var Response
22
     */
23
    private $response;
24
25
    /**
26
     * @param Url $url
27
     * @param DomCrawler $crawler
28
     * @param $response
29
     */
30 10
    public function __construct(Url $url, DomCrawler $crawler, Response $response = null)
31
    {
32 10
        $this->url = $url;
33 10
        $this->crawler = $crawler;
34 10
        $this->response = $response;
35 10
    }
36
37
    /**
38
     * @return Url
39
     */
40 2
    public function getUrl()
41
    {
42 2
        return $this->url;
43
    }
44
45
    /**
46
     * @return DomCrawler
47
     */
48 1
    public function getCrawler()
49
    {
50 1
        return $this->crawler;
51
    }
52
53
    /**
54
     * @return Response
55
     */
56 1
    public function getResponse()
57
    {
58 1
        return $this->response;
59
    }
60
}
61