@@ 188-199 (lines=12) @@ | ||
185 | * |
|
186 | * @throws InvalidIdentifierException If an identifier is invalid. |
|
187 | */ |
|
188 | public function setBuild(array $identifiers) |
|
189 | { |
|
190 | foreach ($identifiers as $identifier) { |
|
191 | if (!Validator::isIdentifier($identifier)) { |
|
192 | throw new InvalidIdentifierException($identifier); |
|
193 | } |
|
194 | } |
|
195 | ||
196 | $this->build = $identifiers; |
|
197 | ||
198 | return $this; |
|
199 | } |
|
200 | ||
201 | /** |
|
202 | * Sets the major version number. |
|
@@ 270-281 (lines=12) @@ | ||
267 | * |
|
268 | * @throws InvalidIdentifierException If an identifier is invalid. |
|
269 | */ |
|
270 | public function setPreRelease(array $identifiers) |
|
271 | { |
|
272 | foreach ($identifiers as $identifier) { |
|
273 | if (!Validator::isIdentifier($identifier)) { |
|
274 | throw new InvalidIdentifierException($identifier); |
|
275 | } |
|
276 | } |
|
277 | ||
278 | $this->preRelease = $identifiers; |
|
279 | ||
280 | return $this; |
|
281 | } |
|
282 | } |
|
283 |