Completed
Push — master ( bb4c66...673514 )
by Jan-Petter
03:55
created

Basic::getDirective()   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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace vipnytt\XRobotsTagParser\Directives;
3
4
/**
5
 * Class Basic
6
 *
7
 * @package vipnytt\XRobotsTagParser\Directives
8
 */
9
final class Basic implements DirectiveInterface
10
{
11
    /**
12
     * Current directive
13
     * @param string
14
     */
15
    protected $directive;
16
17
    /**
18
     * Constructor
19
     *
20
     * @param string $directive
21
     * @param string $rule
22
     */
23
    public function __construct($directive, $rule)
24
    {
25
        $this->directive = mb_strtolower($directive);
26
    }
27
28
    /**
29
     * Get directive name
30
     *
31
     * @return string
32
     */
33
    public function getDirective()
34
    {
35
        return $this->directive;
36
    }
37
38
    /**
39
     * Get value
40
     *
41
     * @return true
42
     */
43
    public function getValue()
44
    {
45
        return true;
46
    }
47
}
48