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\Exception;
use DomainException;
* @author Nikola Posa <[email protected]>
class InvalidConstraintStringException extends DomainException implements Exception
{
public static function forInvalidType($constraintString)
return new self(sprintf(
'Constraint string should be of type string; %s given',
gettype($constraintString)
));
}
public static function forEmptyCostraintString()
return new self('Constraint string must not be empty');
public static function forConstraintString($constraintString)
"Constraint string: '%s' seems to be invalid and it cannot be parsed",
$constraintString