Package   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 65
ccs 0
cts 24
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A install() 0 4 1
A uninstall() 0 4 1
A test() 0 4 1
A show() 0 4 1
A all() 0 4 1
1
<?php
2
3
namespace Buttress\Concrete\Service\Package;
4
5
use Buttress\Concrete\Service\Package\Driver\Driver;
6
use League\CLImate\CLImate;
7
8
class Package
9
{
10
11
    protected $driver;
12
13
    public function __construct(Driver $driver)
14
    {
15
        $this->driver = $driver;
16
    }
17
18
    /**
19
     * Install a package
20
     *
21
     * @param PackageItem $package
22
     * @return \Buttress\Concrete\Service\Result
23
     */
24
    public function install(PackageItem $package)
25
    {
26
        return $this->driver->install($package);
27
    }
28
29
    /**
30
     * Uninstall a package
31
     *
32
     * @param PackageItem $package
33
     * @return \Buttress\Concrete\Service\Result
34
     */
35
    public function uninstall(PackageItem $package)
36
    {
37
        return $this->driver->uninstall($package);
38
    }
39
40
    /**
41
     * Test a package for install
42
     *
43
     * @param PackageItem $package
44
     * @return \Buttress\Concrete\Service\Result
45
     */
46
    public function test(PackageItem $package)
47
    {
48
        return $this->driver->test($package);
49
    }
50
51
    /**
52
     * Show information about a package
53
     *
54
     * @param PackageItem $package
55
     * @param \League\CLImate\CLImate $cli
56
     * @return \Buttress\Concrete\Service\Result
57
     */
58
    public function show(PackageItem $package, CLImate $cli)
59
    {
60
        return $this->driver->show($package, $cli);
61
    }
62
63
    /**
64
     * Get a list of package item objects
65
     * @return PackageItem[]
66
     */
67
    public function all()
68
    {
69
        return $this->driver->all();
70
    }
71
72
}
73