Completed
Push — master ( dfd004...b46837 )
by Jitendra
11s
created

Composer::__construct()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ahc\Phint\Util;
4
5
class Composer extends Executable
6
{
7
    public function __construct($workDir = null, $binary = null)
8
    {
9
        parent::__construct($workDir, $binary ?: 'composer');
10
    }
11
12
    public function createProject($project, $using)
13
    {
14
        $this->runCommand(sprintf('create-project %s %s', $using, $project));
15
16
        return $this;
17
    }
18
19
    public function install()
20
    {
21
        $this->runCommand('install --prefer-dist --optimize-autoloader');
22
23
        return $this;
24
    }
25
}
26