Completed
Push — master ( 0d17ec...34df22 )
by Yaro
02:05
created

BlueprintCreate::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Yaro\ApiDocs\Commands;
4
5
use Illuminate\Console\Command;
6
7
class BlueprintCreate extends Command
8
{
9
    protected $signature = 'apidocs:blueprint-create {name?} {--disc=}';
10
11
    protected $description = 'Create a new Blueprint API file.';
12
13
    public function handle()
14
    {
15
        $apiDocs = app()->make('yaro.apidocs');
16
        $snapshotName = $apiDocs->blueprint()->create((string) $this->argument('name'), (string) $this->option('disc'));
17
18
        $this->info(sprintf('New blueprint snapshot [%s] created successfully.', $snapshotName));
19
    }
20
}
21