mailgun-php/src/Assert.php

28 lines
595 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
2016-11-24 01:01:26 +03:00
/*
* Copyright (C) 2013 Mailgun
2016-11-24 01:01:26 +03:00
*
* This software may be modified and distributed under the terms
2016-12-06 21:12:52 +03:00
* of the MIT license. See the LICENSE file for details.
2016-11-24 01:01:26 +03:00
*/
namespace Mailgun;
use Mailgun\Exception\InvalidArgumentException;
/**
* We need to override Webmozart\Assert because we want to throw our own Exception.
*
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
*/
final class Assert extends \Webmozart\Assert\Assert
{
2016-11-24 01:01:26 +03:00
protected static function reportInvalidArgument($message)
{
2016-11-24 01:01:26 +03:00
throw new InvalidArgumentException($message);
}
}