Total Complexity | 7 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class Profile |
||
11 | { |
||
12 | /** @var Name */ |
||
13 | private $name; |
||
14 | |||
15 | /** @var Version */ |
||
16 | private $version; |
||
17 | |||
18 | private function __construct(Name $name, Version $version) |
||
19 | { |
||
20 | $this->name = $name; |
||
21 | $this->version = $version; |
||
22 | } |
||
23 | |||
24 | public static function createFrom(string $name, string $version): self |
||
29 | ); |
||
30 | } |
||
31 | |||
32 | public function getName(): Name |
||
33 | { |
||
34 | return $this->name; |
||
35 | } |
||
36 | |||
37 | public function getVersion(): Version |
||
38 | { |
||
39 | return $this->version; |
||
40 | } |
||
41 | |||
42 | public function equal(self $profile): bool |
||
43 | { |
||
44 | return $this->name->equal($profile->name) |
||
45 | && $this->version->equal($profile->version); |
||
46 | } |
||
47 | |||
48 | public function __toString(): string |
||
51 | } |
||
52 | } |
||
53 |