Code Duplication    Length = 39-39 lines in 9 locations

src/XRobotsTagParser/directives/all.php 1 location

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

src/XRobotsTagParser/directives/noarchive.php 1 location

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

src/XRobotsTagParser/directives/nofollow.php 1 location

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

src/XRobotsTagParser/directives/noimageindex.php 1 location

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

src/XRobotsTagParser/directives/noindex.php 1 location

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

src/XRobotsTagParser/directives/none.php 1 location

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

src/XRobotsTagParser/directives/noodp.php 1 location

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

src/XRobotsTagParser/directives/nosnippet.php 1 location

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

src/XRobotsTagParser/directives/notranslate.php 1 location

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