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