@@ 135-145 (lines=11) @@ | ||
132 | * @param int|string $major |
|
133 | * @throws InvalidDataTypeException |
|
134 | */ |
|
135 | private function setMajor($major) |
|
136 | { |
|
137 | if (! is_int($major)) { |
|
138 | throw new InvalidDataTypeException( |
|
139 | '$major', |
|
140 | $major, |
|
141 | 'integer' |
|
142 | ); |
|
143 | } |
|
144 | $this->major = absint($major); |
|
145 | } |
|
146 | ||
147 | ||
148 | /** |
|
@@ 161-171 (lines=11) @@ | ||
158 | * @param int|string $minor |
|
159 | * @throws InvalidDataTypeException |
|
160 | */ |
|
161 | private function setMinor($minor) |
|
162 | { |
|
163 | if (! is_int($minor)) { |
|
164 | throw new InvalidDataTypeException( |
|
165 | '$minor', |
|
166 | $minor, |
|
167 | 'integer' |
|
168 | ); |
|
169 | } |
|
170 | $this->minor = absint($minor); |
|
171 | } |
|
172 | ||
173 | ||
174 | /** |
|
@@ 187-197 (lines=11) @@ | ||
184 | * @param int|string $patch |
|
185 | * @throws InvalidDataTypeException |
|
186 | */ |
|
187 | private function setPatch($patch) |
|
188 | { |
|
189 | if (! is_int($patch)) { |
|
190 | throw new InvalidDataTypeException( |
|
191 | '$patch', |
|
192 | $patch, |
|
193 | 'integer' |
|
194 | ); |
|
195 | } |
|
196 | $this->patch = absint($patch); |
|
197 | } |
|
198 | ||
199 | ||
200 | /** |
|
@@ 250-260 (lines=11) @@ | ||
247 | * @param int|string $build |
|
248 | * @throws InvalidDataTypeException |
|
249 | */ |
|
250 | private function setBuild($build) |
|
251 | { |
|
252 | if (! is_int($build)) { |
|
253 | throw new InvalidDataTypeException( |
|
254 | '$build', |
|
255 | $build, |
|
256 | 'integer' |
|
257 | ); |
|
258 | } |
|
259 | $this->build = absint($build); |
|
260 | } |
|
261 | ||
262 | ||
263 | /** |