RootDirectiveHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 40
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
/**
3
 * vipnytt/RobotsTxtParser
4
 *
5
 * @link https://github.com/VIPnytt/RobotsTxtParser
6
 * @license https://github.com/VIPnytt/RobotsTxtParser/blob/master/LICENSE The MIT License (MIT)
7
 */
8
9
namespace vipnytt\RobotsTxtParser\Handler\Directives;
10
11
use vipnytt\RobotsTxtParser\Parser\Directives\CleanParamParser;
12
use vipnytt\RobotsTxtParser\Parser\Directives\HostParser;
13
use vipnytt\RobotsTxtParser\Parser\Directives\SitemapParser;
14
use vipnytt\RobotsTxtParser\Parser\Directives\UserAgentParser;
15
use vipnytt\RobotsTxtParser\RobotsTxtInterface;
16
17
/**
18
 * Class RootDirectiveHandler
19
 *
20
 * @package vipnytt\RobotsTxtParser\Parser\Directives
21
 */
22
class RootDirectiveHandler implements RobotsTxtInterface
23
{
24
    /**
25
     * Clean-param
26
     * @var CleanParamParser
27
     */
28
    public $cleanParam;
29
30
    /**
31
     * Host
32
     * @var HostParser
33
     */
34
    public $host;
35
36
    /**
37
     * Sitemap
38
     * @var SitemapParser
39
     */
40
    public $sitemap;
41
42
    /**
43
     * User-agent
44
     * @var UserAgentParser
45
     */
46
    public $userAgent;
47
48
    /**
49
     * RootDirectiveHandler constructor.
50
     *
51
     * @param string $base
52
     * @param string $effective
53
     */
54
    public function __construct($base, $effective)
55
    {
56
        $this->cleanParam = new CleanParamParser();
57
        $this->host = new HostParser($base, $effective);
58
        $this->sitemap = new SitemapParser();
59
        $this->userAgent = new UserAgentParser($base);
60
    }
61
}
62