InvalidArgument::emptyQuery()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gemz\GeoIp\Exceptions;
4
5
class InvalidArgument extends \Exception
6
{
7
    public static function queryNotValid(string $query): self
8
    {
9
        return new self("The given query `{$query}` is not a valid url or ipv4 or ipv6 address");
10
    }
11
12
    public static function localeNotValid(string $locale): self
13
    {
14
        return new self("The given locale `{$locale}` is not a valid locale");
15
    }
16
17
    public static function emptyQuery()
18
    {
19
        return new self("There is no query. Please provide a query in form of for('domain')");
20
    }
21
}
22