Code Duplication    Length = 39-39 lines in 9 locations

src/XRobotsTagParser/directives/all.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class all implements directiveInterface
7
{
8
    const DIRECTIVE = 'all';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/noarchive.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class noarchive implements directiveInterface
7
{
8
    const DIRECTIVE = 'noarchive';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/nofollow.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class nofollow implements directiveInterface
7
{
8
    const DIRECTIVE = 'nofollow';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/noimageindex.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class noimageindex implements directiveInterface
7
{
8
    const DIRECTIVE = 'noimageindex';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/noindex.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class noindex implements directiveInterface
7
{
8
    const DIRECTIVE = 'noindex';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/none.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class none implements directiveInterface
7
{
8
    const DIRECTIVE = 'none';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $value
14
     * @param array $options
15
     */
16
    public function __construct($value, $options = [])
17
    {
18
        foreach ($options as $key => $value) {
19
            if (isset($this->$key)) {
20
                $this->$key = $value;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/noodp.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class noodp implements directiveInterface
7
{
8
    const DIRECTIVE = 'noodp';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/nosnippet.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class nosnippet implements directiveInterface
7
{
8
    const DIRECTIVE = 'nosnippet';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}

src/XRobotsTagParser/directives/notranslate.php 1 location

@@ 6-44 (lines=39) @@
3
namespace vipnytt\XRobotsTagParser\directives;
4
5
6
final class notranslate implements directiveInterface
7
{
8
    const DIRECTIVE = 'notranslate';
9
10
    /**
11
     * Constructor
12
     *
13
     * @param string $rule
14
     * @param array $options
15
     */
16
    public function __construct($rule, $options = [])
17
    {
18
        foreach ($options as $key => $rule) {
19
            if (isset($this->$key)) {
20
                $this->$key = $rule;
21
            }
22
        }
23
    }
24
25
    /**
26
     * Get directive name
27
     *
28
     * @return string
29
     */
30
    public function getDirective()
31
    {
32
        return self::DIRECTIVE;
33
    }
34
35
    /**
36
     * Get value
37
     *
38
     * @return bool|string|null
39
     */
40
    public function getValue()
41
    {
42
        return true;
43
    }
44
}