Completed
Push — master ( 7ba6fb...31ed5b )
by Dev
39:27 queued 38:12
created

Url   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 27
ccs 6
cts 7
cp 0.8571
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace PiedWeb\SeoPocketCrawler;
4
5
use PiedWeb\UrlHarvester\Harvest;
6
7
class Url
8
{
9
    public $sha1;
10
    public $uri;
11
    public $updated_at;
12
    public $can_be_crawled;
13
    public $indexable;
14
    public $links;
15
    public $links_duplicate;
16
    public $links_self;
17
    public $links_internal;
18
    public $links_sub;
19
    public $links_external;
20
    public $ratio_text_code;
21
    public $load_time;
22
    public $size;
23
    public $title;
24
    public $kws;
25
    public $h1;
26
27 2
    public function __construct($url, $click)
28
    {
29 2
        $this->sha1 = sha1($url);
30 2
        $this->uri = substr($url, strlen(Harvest::getDomainAndSchemeFrom($url)));
31 2
        $this->updated_at = date('Ymd');
32 2
        $this->inboundlinks = 0;
0 ignored issues
show
Bug Best Practice introduced by
The property inboundlinks does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
33 2
        $this->click = $click;
0 ignored issues
show
Bug Best Practice introduced by
The property click does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
34 2
    }
35
}
36