Completed
Pull Request — master (#76)
by
unknown
04:28
created

Composer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace BeyondCode\SelfDiagnosis;
4
5
class Composer extends \Illuminate\Support\Composer
6
{
7
    public function installDryRun(string $options = null)
8
    {
9
        $composer = $this->findComposer();
10
11
        $command = array_merge(
12
            (array) $composer,
13
            ['install', '--dry-run'],
14
            array_filter(array_map('trim', explode(' ', $options))),
15
        );
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected ')'
Loading history...
16
17
        if (is_array($composer)) {
18
            $process = $this->getProcess($command);
19
        } else {
20
            $process = $this->getProcess();
21
            $process->setCommandLine(trim(implode(' ', $command)));
22
        }
23
24
        $process->run();
25
26
        return $process->getOutput() . $process->getErrorOutput();
27
    }
28
}