AdConfigurationCreate   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 19
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 1
1
<?php
2
3
namespace NovaAdDirector\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use NovaAdDirector\Models\AdConfiguration;
7
8
class AdConfigurationCreate extends Command
9
{
10
    protected $signature = 'nova-ad-director:ad-config:create
11
        {key : Key name}
12
        {location : Location name}
13
        {--status=disabled : Status}
14
    ';
15
16
    protected $description = 'Create new ad configuration in database';
17
18
    public function handle()
19
    {
20
        AdConfiguration::create([
21
            'key'      => $this->argument('key'),
22
            'location' => $this->argument('location'),
23
            'status'   => $this->option('status'),
24
        ]);
25
26
        return 0;
27
    }
28
}
29