Completed
Push — master ( 912db6...6fd1ed )
by Jean Paul
13s queued 12s
created

WebPageSource   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 9
c 1
b 0
f 0
dl 0
loc 29
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setHandler() 0 3 1
A getHandler() 0 3 1
A __construct() 0 4 1
A getUrl() 0 3 1
A setUrl() 0 3 1
1
<?php
2
3
namespace Coco\SourceWatcher\Watcher\Source;
4
5
use Coco\SourceWatcher\Watcher\Handler\Handler;
6
use Coco\SourceWatcher\Watcher\Handler\WebPageHandler;
7
8
class WebPageSource implements Source
9
{
10
    protected String $url;
11
    protected WebPageHandler $handler;
12
13
    public function __construct ( String $url )
14
    {
15
        $this->url = $url;
16
        $this->handler = new WebPageHandler( $url );
17
    }
18
19
    public function getUrl () : String
20
    {
21
        return $this->url;
22
    }
23
24
    public function setUrl ( String $url ) : void
25
    {
26
        $this->url = $url;
27
    }
28
29
    public function getHandler () : Handler
30
    {
31
        return $this->handler;
32
    }
33
34
    public function setHandler ( Handler $handler ) : void
35
    {
36
        $this->handler = $handler;
37
    }
38
}
39