Completed
Push — develop ( 625623...60981e )
by Abdelrahman
08:42 queued 12s
created

LarouteGeneratorCommand::handle()   A

Complexity

Conditions 2
Paths 3

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
cc 2
nc 3
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\Overrides\Lord\Laroute\Console\Commans;
6
7
use Lord\Laroute\Console\Commands\LarouteGeneratorCommand as BaseLarouteGeneratorCommand;
8
9
class LarouteGeneratorCommand extends BaseLarouteGeneratorCommand
10
{
11
    /**
12
     * Execute the console command.
13
     *
14
     * @return void
15
     */
16
    public function handle()
17
    {
18
        $this->line('');
19
20
        try {
21
            $filePath = $this->generator->compile(
22
                $this->getTemplatePath(),
23
                $this->getTemplateData(),
24
                $this->getFileGenerationPath()
25
            );
26
27
            $this->info("Created: {$filePath}");
28
        } catch (\Exception $e) {
29
            $this->error($e->getMessage());
30
        }
31
        $this->line('');
32
    }
33
}
34