Passed
Branch etl-core (c0e492)
by Jean Paul
01:52
created

WebPageSource::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Coco\SourceWatcher\Watcher\Source;
4
5
use Coco\SourceWatcher\Handler\Handler;
0 ignored issues
show
Bug introduced by
The type Coco\SourceWatcher\Handler\Handler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Coco\SourceWatcher\Handler\WebPageHandler;
0 ignored issues
show
Bug introduced by
The type Coco\SourceWatcher\Handler\WebPageHandler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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