| Total Complexity | 7 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class PharInvocation |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $baseName; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $alias; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $baseName |
||
| 31 | * @param string $alias |
||
| 32 | */ |
||
| 33 | public function __construct(string $baseName, string $alias = '') |
||
| 34 | { |
||
| 35 | if ($baseName === '') { |
||
| 36 | throw new Exception( |
||
| 37 | 'Base-name cannot be empty', |
||
| 38 | 1551283689 |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | $this->baseName = $baseName; |
||
| 42 | $this->alias = $alias; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function __toString(): string |
||
| 49 | { |
||
| 50 | return $this->baseName; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getBaseName(): string |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return null|string |
||
| 63 | */ |
||
| 64 | public function getAlias(): string |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @param PharInvocation $other |
||
| 71 | * @return bool |
||
| 72 | */ |
||
| 73 | public function equals(PharInvocation $other): bool |
||
| 79 |