mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 07:43:12 +08:00
Extract logic to match IP address against list of groups
This commit is contained in:
15
module/Core/src/Exception/InvalidIpFormatException.php
Normal file
15
module/Core/src/Exception/InvalidIpFormatException.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Exception;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
class InvalidIpFormatException extends RuntimeException implements ExceptionInterface
|
||||
{
|
||||
public static function fromInvalidIp(string $ipAddress): self
|
||||
{
|
||||
return new self(sprintf('Provided IP %s does not have the right format. Expected X.X.X.X', $ipAddress));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user