Code Duplication    Length = 13-13 lines in 2 locations

src/Bisarca/RobotsTxt/Ruleset.php 1 location

@@ 62-74 (lines=13) @@
59
     *
60
     * @return bool
61
     */
62
    public function remove(DirectiveInterface $directive): bool
63
    {
64
        $key = array_search($directive, $this->data, true);
65
66
        if (false !== $key) {
67
            unset($this->data[$key]);
68
            $this->data = array_values($this->data);
69
70
            return true;
71
        }
72
73
        return false;
74
    }
75
76
    /**
77
     * Checks if a user agent is allowed.

src/Bisarca/RobotsTxt/Rulesets.php 1 location

@@ 64-76 (lines=13) @@
61
     *
62
     * @return bool
63
     */
64
    public function remove(Ruleset $ruleset): bool
65
    {
66
        $key = array_search($ruleset, $this->data, true);
67
68
        if (false !== $key) {
69
            unset($this->data[$key]);
70
            $this->data = array_values($this->data);
71
72
            return true;
73
        }
74
75
        return false;
76
    }
77
78
    /**
79
     * Checks if a user agent is allowed.