Code Duplication    Length = 8-8 lines in 4 locations

src/Console/Command/ModuleCreateCommand.php 4 locations

@@ 417-424 (lines=8) @@
414
        }
415
416
        // Twig Checks
417
        if ($this->tplEngine == self::TPL_ENGINE_TWIG) {
418
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
419
                $output->writeln(sprintf("<comment>Twig is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
420
            }
421
            if (!class_exists('\Twig_Environment')) {
422
                $output->writeln("<comment>Twig doesn't appear to be loaded. Run: <info>composer require ppi/twig-module</info></comment>");
423
            }
424
        }
425
426
        // Smarty Checks
427
        if ($this->tplEngine == self::TPL_ENGINE_SMARTY) {
@@ 427-434 (lines=8) @@
424
        }
425
426
        // Smarty Checks
427
        if ($this->tplEngine == self::TPL_ENGINE_SMARTY) {
428
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
429
                $output->writeln(sprintf("<comment>Smarty is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
430
            }
431
            if (!class_exists('\Smarty')) {
432
                $output->writeln("<comment>Smarty doesn't appear to be loaded. Run: <info>composer require ppi/smarty-module</info></comment>");
433
            }
434
        }
435
436
        // Plates Checks
437
        if ($this->tplEngine == self::TPL_ENGINE_PLATES) {
@@ 437-444 (lines=8) @@
434
        }
435
436
        // Plates Checks
437
        if ($this->tplEngine == self::TPL_ENGINE_PLATES) {
438
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
439
                $output->writeln(sprintf("<comment>Plates is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
440
            }
441
            if (!class_exists('\PPI\PlatesModule\Wrapper\PlatesWrapper')) {
442
                $output->writeln("<comment>Plates doesn't appear to be loaded. Run: <info>composer require ppi/plates-module</info></comment>");
443
            }
444
        }
445
446
        // Plates Checks
447
        if ($this->tplEngine == self::TPL_ENGINE_LATTE) {
@@ 447-454 (lines=8) @@
444
        }
445
446
        // Plates Checks
447
        if ($this->tplEngine == self::TPL_ENGINE_LATTE) {
448
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
449
                $output->writeln(sprintf("<comment>Latte is not an enabled templating engine. Add <info>%s</info> it in <info>config[framework][templating][engines]</info> key</comment>", $this->tplEngine));
450
            }
451
            if (!class_exists('\PPI\LatteModule\Wrapper\LatteWrapper')) {
452
                $output->writeln("<comment>Latte doesn't appear to be loaded. Run: <info>composer require ppi/latte-module</info></comment>");
453
            }
454
        }
455
456
    }
457
}