Completed
Push — master ( c83bef...20fddf )
by Freek
09:52
created

CrawlUrl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 6 1
1
<?php
2
3
namespace Spatie\Crawler;
4
5
class CrawlUrl
6
{
7
    /** @var \Spatie\Crawler\Url */
8
    public $url;
9
10
    /** @var \Spatie\Crawler\Url */
11
    public $foundOnUrl;
12
13
    public static function create(Url $url, Url $foundOnUrl = null)
14
    {
15
        return new static($url, $foundOnUrl);
16
    }
17
18
    protected function __construct(Url $url, Url $foundOnUrl = null)
19
    {
20
        $this->url = $url;
21
22
        $this->foundOnUrl = $foundOnUrl;
23
    }
24
}
25