php-ml/src/Phpml/Exception/InvalidArgumentException.php
2016-04-18 22:58:43 +02:00

27 lines
515 B
PHP

<?php
declare (strict_types = 1);
namespace Phpml\Exception;
class InvalidArgumentException extends \Exception
{
/**
* @return InvalidArgumentException
*/
public static function arraySizeNotMatch()
{
return new self('Size of given arrays not match');
}
/**
* @param $name
*
* @return InvalidArgumentException
*/
public static function percentNotInRange($name)
{
return new self(sprintf('%s must be between 0.0 and 1.0', $name));
}
}