Total Complexity | 6 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class RunOpts |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $prefix; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $binaryPackage; |
||
21 | |||
22 | /** |
||
23 | * Static factory method |
||
24 | * |
||
25 | * @param string $prefix |
||
26 | * @param string $binaryPackage package name or path to binary (string) |
||
27 | * @return RunOpts |
||
28 | */ |
||
29 | 1 | public static function create($prefix, $binaryPackage = null) |
|
30 | { |
||
31 | 1 | return new self($prefix, $binaryPackage); |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * RunOpts constructor. |
||
36 | * |
||
37 | * NOTE: All run options are optional by design (pass NULL). |
||
38 | * |
||
39 | * @param string $prefix |
||
40 | * @param string $binaryPackage package name or path to binary (string) |
||
41 | */ |
||
42 | 1 | public function __construct($prefix = null, $binaryPackage = null) |
|
46 | 1 | } |
|
47 | |||
48 | /** |
||
49 | * @param string $prefix |
||
50 | */ |
||
51 | 1 | public function setPrefix($prefix) |
|
52 | { |
||
53 | 1 | $this->prefix = $prefix; |
|
54 | 1 | } |
|
55 | |||
56 | /** |
||
57 | * The prefix is used when creating containers for the container name. |
||
58 | * |
||
59 | * See --prefix option. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | 1 | public function getPrefix() |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * @param string $binaryPackage |
||
70 | */ |
||
71 | 1 | public function setBinaryPackage($binaryPackage) |
|
74 | 1 | } |
|
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | 1 | public function getBinaryPackage() |
|
84 |