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

Composer   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 4

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 2
A install() 0 5 1
A createProject() 0 5 1
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