for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Version package.
*
* Copyright (c) Nikola Posa <[email protected]>
* For full copyright and license information, please refer to the LICENSE file,
* located at the package root folder.
*/
namespace Version\Identifier;
use Version\Exception\InvalidIdentifierValueException;
* @author Nikola Posa <[email protected]>
final class PreReleaseIdentifier extends BaseIdentifier
{
protected static function validate($value)
if (!preg_match('/^[0-9A-Za-z\-]+$/', $value)) {
throw new InvalidIdentifierValueException(__CLASS__ . ' value must contain only alphanumerics and hyphen');
}