Code Duplication    Length = 8-8 lines in 4 locations

src/Console/Command/ModuleCreateCommand.php 4 locations

@@ 370-377 (lines=8) @@
367
        }
368
369
        // Twig Checks
370
        if ($this->tplEngine == self::TPL_ENGINE_TWIG) {
371
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
372
                $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));
373
            }
374
            if (!class_exists('\Twig_Environment')) {
375
                $output->writeln("<comment>Twig doesn't appear to be loaded. Run: <info>composer require ppi/twig-module</info></comment>");
376
            }
377
        }
378
379
        // Smarty Checks
380
        if ($this->tplEngine == self::TPL_ENGINE_SMARTY) {
@@ 380-387 (lines=8) @@
377
        }
378
379
        // Smarty Checks
380
        if ($this->tplEngine == self::TPL_ENGINE_SMARTY) {
381
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
382
                $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));
383
            }
384
            if (!class_exists('\Smarty')) {
385
                $output->writeln("<comment>Smarty doesn't appear to be loaded. Run: <info>composer require ppi/smarty-module</info></comment>");
386
            }
387
        }
388
389
        // Plates Checks
390
        if ($this->tplEngine == self::TPL_ENGINE_PLATES) {
@@ 390-397 (lines=8) @@
387
        }
388
389
        // Plates Checks
390
        if ($this->tplEngine == self::TPL_ENGINE_PLATES) {
391
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
392
                $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));
393
            }
394
            if (!class_exists('\PPI\PlatesModule\Wrapper\PlatesWrapper')) {
395
                $output->writeln("<comment>Plates doesn't appear to be loaded. Run: <info>composer require ppi/plates-module</info></comment>");
396
            }
397
        }
398
399
        // Plates Checks
400
        if ($this->tplEngine == self::TPL_ENGINE_LATTE) {
@@ 400-407 (lines=8) @@
397
        }
398
399
        // Plates Checks
400
        if ($this->tplEngine == self::TPL_ENGINE_LATTE) {
401
            if (!in_array($this->tplEngine, $this->configEnabledTemplatingEngines)) {
402
                $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));
403
            }
404
            if (!class_exists('\PPI\LatteModule\Wrapper\LatteWrapper')) {
405
                $output->writeln("<comment>Latte doesn't appear to be loaded. Run: <info>composer require ppi/latte-module</info></comment>");
406
            }
407
        }
408
    }
409
410
    /**