Code Duplication    Length = 8-8 lines in 2 locations

src/Controller/AbstractController.php 2 locations

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