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

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