PolyglotStrategy::install()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Strategies\Dependencies;
14
15
use Rocketeer\Strategies\AbstractPolyglotStrategy;
16
17
/**
18
 * Runs all of the above package managers if necessary.
19
 */
20
class PolyglotStrategy extends AbstractPolyglotStrategy implements DependenciesStrategyInterface
21
{
22
    /**
23
     * The type of the sub-strategies.
24
     *
25
     * @var string
26
     */
27
    protected $type = 'Dependencies';
28
29
    /**
30
     * @var string
31
     */
32
    protected $description = 'Runs all of the above package managers if necessary';
33
34
    /**
35
     * The various strategies to call.
36
     *
37
     * @var array
38
     */
39
    protected $strategies = ['Bundler', 'Composer', 'Npm', 'Bower'];
40
41
    /**
42
     * Install the dependencies.
43
     *
44
     * @return bool
45
     */
46 2
    public function install()
47
    {
48 2
        return $this->checkStrategiesMethod('install');
49
    }
50
51
    /**
52
     * Update the dependencies.
53
     *
54
     * @return bool
55
     */
56
    public function update()
57
    {
58
        return $this->checkStrategiesMethod('update');
59
    }
60
}
61