mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-09-27 14:39:02 +00:00
27 lines
515 B
PHP
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));
|
|
}
|
|
}
|