Code Duplication    Length = 8-8 lines in 4 locations

src/Console/Command/ModuleCreateCommand.php 4 locations

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