Completed
Push — master ( e1c388...7bf58d )
by
unknown
12:55 queued 10:58
created

ShellShortOption   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PHPSu\ShellCommandBuilder\Literal;
6
7
use PHPSu\ShellCommandBuilder\ShellInterface;
8
9
final class ShellShortOption extends ShellWord
10
{
11
    protected $isShortOption = true;
12
    protected $prefix = ShellWord::SHORT_OPTION_CONTROL;
13
14
    /**
15
     * ShellArgument constructor.
16
     * @param string $option
17
     * @param ShellInterface|string $value
18
     */
19
    public function __construct(string $option, $value)
20
    {
21
        if (is_string($value) && empty($value)) {
22
            $this->delimiter = '';
23
        }
24
        parent::__construct($option, $value);
25
    }
26
}
27