Passed
Branch master (b142f3)
by Jan-Petter
02:30
created

none   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 28
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getDirective() 0 4 1
A getArray() 0 9 1
A getValue() 0 4 1
1
<?php
2
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class none implements directiveInterface
7
{
8
    const DIRECTIVE = 'none';
9
10
    public function __construct($value = null)
11
    {
12
    }
13
14
    public function getDirective()
15
    {
16
        return self::DIRECTIVE;
17
    }
18
19
    public function getArray()
20
    {
21
        $result = [self::DIRECTIVE => $this->getValue()];
22
        $noindex = new noindex();
23
        $result[$noindex->getDirective()] = $noindex->getValue();
24
        $nofollow = new nofollow();
25
        $result[$nofollow->getDirective()] = $nofollow->getValue();
26
        return $result;
27
    }
28
29
    public function getValue()
30
    {
31
        return true;
32
    }
33
}