Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class Package |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $name; |
||
13 | |||
14 | /** |
||
15 | * @param string $name |
||
16 | * @throws EmptyValueException |
||
17 | */ |
||
18 | public function __construct(string $name) |
||
19 | { |
||
20 | if(empty($name)) { |
||
21 | throw new EmptyValueException('Package name can\'t be empty'); |
||
22 | } |
||
23 | |||
24 | $this->name = $name; |
||
25 | } |
||
26 | |||
27 | public function __toString() |
||
30 | } |
||
31 | } |