Code Duplication    Length = 8-8 lines in 2 locations

src/Controller/AbstractController.php 2 locations

@@ 266-273 (lines=8) @@
263
        // Search in core view helpers first
264
        $corePlugin = 'Faulancer\Plugin\\' . ucfirst($name);
265
266
        if (class_exists($corePlugin)) {
267
268
            $class = new $corePlugin;
269
            array_unshift($arguments, $this);
270
271
            return call_user_func_array($class, $arguments);
272
273
        }
274
275
        // No core implementations found; search in custom view helpers
276
@@ 283-290 (lines=8) @@
280
281
        $customPlugin = $namespace . '\Plugin\\' . ucfirst($name);
282
283
        if (class_exists($customPlugin)) {
284
285
            $class = new $customPlugin;
286
            array_unshift($arguments, $this);
287
288
            return call_user_func_array($class, $arguments);
289
290
        }
291
292
        throw new PluginException('No plugin for "' . $name . '" found.');
293
    }