Code Duplication    Length = 14-14 lines in 2 locations

src/Http/RouteListController.php 1 location

@@ 87-100 (lines=14) @@
84
     *
85
     * @return bool
86
     */
87
    protected function matches($patterns, $subject)
88
    {
89
        $isMatched = false;
90
91
        foreach ($patterns as $pattern) {
92
            if (preg_match($pattern, $subject)) {
93
                $isMatched = true;
94
95
                break;
96
            }
97
        }
98
99
        return $isMatched;
100
    }
101
}
102

src/View/Components/RouteList.php 1 location

@@ 98-111 (lines=14) @@
95
     *
96
     * @return bool
97
     */
98
    protected function matches($patterns, $subject)
99
    {
100
        $isMatched = false;
101
102
        foreach ($patterns as $pattern) {
103
            if (preg_match($pattern, $subject)) {
104
                $isMatched = true;
105
106
                break;
107
            }
108
        }
109
110
        return $isMatched;
111
    }
112
}
113