Completed
Push — master ( 7f9222...2c377d )
by Jan-Petter
03:31
created

NoIndex   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 45
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDirective() 0 4 1
A getValue() 0 4 1
A getMeaning() 0 4 1
1
<?php
2
namespace vipnytt\XRobotsTagParser\Directives;
3
4
/**
5
 * Class NoIndex
6
 *
7
 * @package vipnytt\XRobotsTagParser\Directives
8
 */
9
final class NoIndex implements DirectiveInterface
10
{
11
    const DIRECTIVE = 'noindex';
12
    const MEANING = 'Do not show this page in search results and do not show a `Cached` link in search results.';
13
14
    /**
15
     * Constructor
16
     *
17
     * @param string $rule
18
     */
19
    public function __construct($rule)
20
    {
21
22
    }
23
24
    /**
25
     * Get directive name
26
     *
27
     * @return string
28
     */
29
    public function getDirective()
30
    {
31
        return self::DIRECTIVE;
32
    }
33
34
    /**
35
     * Get value
36
     *
37
     * @return bool|string|null
38
     */
39
    public function getValue()
40
    {
41
        return true;
42
    }
43
44
    /**
45
     * Get directive meaning
46
     *
47
     * @return string
48
     */
49
    public function getMeaning()
50
    {
51
        return self::MEANING;
52
    }
53
}
54