Code Duplication    Length = 6-6 lines in 2 locations

src/View/ViewController.php 2 locations

@@ 228-233 (lines=6) @@
225
    {
226
        $coreViewHelper = __NAMESPACE__ . '\Helper\\' . ucfirst($name);
227
228
        if (class_exists($coreViewHelper)) {
229
            $class = new $coreViewHelper;
230
            array_unshift($arguments, $this);
231
            $this->viewHelper[$coreViewHelper] = call_user_func_array($class, $arguments);
232
            return $this->viewHelper[$coreViewHelper];
233
        }
234
235
        /** @var Config $config */
236
        $config    = ServiceLocator::instance()->get(Config::class);
@@ 241-246 (lines=6) @@
238
239
        $customViewHelper = $namespace . '\\View\\' . ucfirst($name);
240
241
        if (class_exists($customViewHelper)) {
242
            $class = new $customViewHelper;
243
            array_unshift($arguments, $this);
244
            $this->viewHelper[$customViewHelper] = $class($arguments);
245
            return $this->viewHelper[$customViewHelper];
246
        }
247
248
        throw new ClassNotFoundException('No compatible view helper for "' . $name . '" found.');
249
    }