InvalidImageUrlException::make()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\Gravatar\Exceptions;
6
7
use InvalidArgumentException;
8
9
/**
10
 * Class     InvalidImageUrlException
11
 *
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
class InvalidImageUrlException extends InvalidArgumentException
15
{
16
    /* -----------------------------------------------------------------
17
     |  Main Methods
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * @param  string  $image
23
     *
24
     * @return static
25
     */
26 8
    public static function make(string $image)
27
    {
28 8
        return new static(
29 8
            "The default image specified is not a recognized gravatar `default` and is not a valid URL: `{$image}`"
30
        );
31
    }
32
}
33