php-ml/src/Phpml/Exception/InvalidArgumentException.php

27 lines
515 B
PHP
Raw Normal View History

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