Page   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
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 __construct() 0 6 1
A getUrl() 0 4 1
A getCrawler() 0 4 1
A getResponse() 0 4 1
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