Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class ShellExpression extends BasicExpression |
||
11 | { |
||
12 | protected $escapedValue = true; |
||
13 | |||
14 | public static function create(bool $useBashBrackets = true, bool $negateExpression = false): ShellExpression |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * @param string|ShellInterface $optname |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function isOptnameEnabled($optname): self |
||
24 | { |
||
25 | $this->operator = ConditionalOperator::SHELL_OPTNAME_ENABLED; |
||
26 | $this->compareWith = $optname; |
||
27 | return $this; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param string|ShellInterface $variable |
||
32 | * @return $this |
||
33 | */ |
||
34 | public function isVariableSet($variable): self |
||
35 | { |
||
36 | $this->operator = ConditionalOperator::SHELL_VARNAME_SET; |
||
37 | $this->compareWith = $variable; |
||
38 | return $this; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string|ShellInterface $variable |
||
43 | * @return $this |
||
44 | */ |
||
45 | public function isVariableSetWithNamedReference($variable): self |
||
50 | } |
||
51 | } |
||
52 |