1 | <?php |
||
20 | class Commit |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $hash; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $names; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $description; |
||
36 | |||
37 | /** |
||
38 | * @var \DateTimeImmutable |
||
39 | */ |
||
40 | private $date; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $author; |
||
46 | |||
47 | /** |
||
48 | * Commit constructor. |
||
49 | * |
||
50 | * @param string $hash |
||
51 | * @param array $names |
||
52 | * @param string $description |
||
53 | * @param \DateTimeImmutable $date |
||
54 | * @param string $author |
||
55 | */ |
||
56 | 4 | public function __construct( |
|
70 | |||
71 | /** |
||
72 | * Hash getter. |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | 2 | public function getHash(): string |
|
80 | |||
81 | /** |
||
82 | * Does the commit have names. |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | 1 | public function hasNames(): bool |
|
90 | |||
91 | /** |
||
92 | * Names getter. |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | 1 | public function getNames(): array |
|
100 | |||
101 | /** |
||
102 | * Description getter. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | 1 | public function getDescription(): string |
|
110 | |||
111 | /** |
||
112 | * Date getter. |
||
113 | * |
||
114 | * @return \DateTimeImmutable |
||
115 | */ |
||
116 | 1 | public function getDate(): \DateTimeImmutable |
|
120 | |||
121 | /** |
||
122 | * Author getter. |
||
123 | * |
||
124 | * @return string |
||
125 | */ |
||
126 | 4 | public function getAuthor(): string |
|
130 | } |
||
131 |