Completed
Pull Request — master (#9)
by Jitendra
01:58
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
    /** @var string The binary executable */
8
    protected $binary = 'composer';
9
10
    public function createProject($project, $using)
11
    {
12
        $this->runCommand(sprintf('create-project %s %s', $using, $project));
13
14
        return $this;
15
    }
16
17
    public function install()
18
    {
19
        $this->runCommand('install --prefer-dist --optimize-autoloader --no-suggest');
20
21
        return $this;
22
    }
23
24
    public function update()
25
    {
26
        $this->runCommand('update --prefer-dist --optimize-autoloader --no-suggest');
27
28
        return $this;
29
    }
30
}
31