Code Duplication    Length = 10-10 lines in 2 locations

src/Variables/Name.php 1 location

@@ 38-47 (lines=10) @@
35
    /**
36
     * @inheritdocs
37
     */
38
    public function arguments_are_valid(array &$arguments) {
39
        if (count($arguments) != 1) {
40
            return false;
41
        }
42
        $regexp = $arguments[0];
43
        if (!is_string($regexp) || @preg_match("%^$regexp\$%", "") === false) {
44
            return false;
45
        }
46
        return true;
47
    }
48
49
    /**
50
     * @inheritdocs

src/Rules/ContainText.php 1 location

@@ 45-54 (lines=10) @@
42
    /**
43
     * @inheritdoc
44
     */
45
    public function arguments_are_valid(array &$arguments) {
46
        if (count($arguments) != 1) {
47
            return false;
48
        }
49
        $regexp = $arguments[0];
50
        if (!is_string($regexp) || @preg_match("%$regexp%", "") === false) {
51
            return false;
52
        }
53
        return true;
54
    }
55
56
    /**
57
     * @inheritdoc