Passed
Pull Request — master (#2)
by Thomas
03:05
created

OpenIdeService   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 13
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A call() 0 10 3
1
<?php
2
3
namespace Webfactor\Laravel\Generators\Services;
4
5
use Webfactor\Laravel\Generators\Contracts\ServiceAbstract;
6
use Webfactor\Laravel\Generators\Contracts\ServiceInterface;
7
8
class OpenIdeService extends ServiceAbstract implements ServiceInterface
9
{
10
    public function call()
11
    {
12
        if (!$ide = $this->command->option('ide')) {
13
            return;
14
        }
15
16
        if ($ideClass = config('webfactor.generators.ides.' . $ide)) {
17
            (new $ideClass($this->command->filesToBeOpened))->open();
18
        }
19
    }
20
}
21