Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidLimitValue PHP Method

createForInvalidLimitValue() public static method

public static createForInvalidLimitValue ( integer $limit ) : InvalidArgumentException
$limit integer
return InvalidArgumentException
    public static function createForInvalidLimitValue(int $limit) : \InvalidArgumentException
    {
        return new \InvalidArgumentException(sprintf('Expected limit value to be a strictly positive integer, got "%d" instead.', $limit));
    }

Usage Example

Esempio n. 1
0
 public function __construct(ValueResolverInterface $resolver = null, int $limit = 5)
 {
     $this->resolver = $resolver;
     if ($limit < 1) {
         throw InvalidArgumentExceptionFactory::createForInvalidLimitValue($limit);
     }
     $this->limit = $limit;
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidLimitValue