Code Duplication    Length = 12-13 lines in 2 locations

src/Route/RouteHandler.php 2 locations

@@ 148-159 (lines=12) @@
145
        $action3 = "catchAll{$method}";
146
        $action4 = "catchAll";
147
148
        foreach ([$action1, $action2] as $target) {
149
            try {
150
                $refl = new \ReflectionMethod($class, $target);
151
                if (!$refl->isPublic()) {
152
                    throw new NotFoundException("Controller method '$class::$target' is not a public method.");
153
                }
154
155
                return [$class, $target, $args];
156
            } catch (\ReflectionException $e) {
157
                ;
158
            }
159
        }
160
161
        foreach ([$action3, $action4] as $target) {
162
            try {
@@ 161-173 (lines=13) @@
158
            }
159
        }
160
161
        foreach ([$action3, $action4] as $target) {
162
            try {
163
                $refl = new \ReflectionMethod($class, $target);
164
                if (!$refl->isPublic()) {
165
                    throw new NotFoundException("Controller method '$class::$target' is not a public method.");
166
                }
167
168
                array_unshift($args, $action);
169
                return [$class, $target, $args];
170
            } catch (\ReflectionException $e) {
171
                ;
172
            }
173
        }
174
175
        return false;
176
    }