InvalidImageRatingException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 19
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\Gravatar\Exceptions;
6
7
use InvalidArgumentException;
8
9
/**
10
 * Class     InvalidImageRatingException
11
 *
12
 * @author   ARCANEDEV <[email protected]>
13
 */
14
class InvalidImageRatingException extends InvalidArgumentException
15
{
16
    /* -----------------------------------------------------------------
17
     |  Main Methods
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * @param  string  $rating
23
     *
24
     * @return static
25
     */
26 4
    public static function make(string $rating)
27
    {
28 4
        return new static(
29 4
            "Invalid rating '{$rating}' specified, only 'g', 'pg', 'r' or 'x' are supported."
30
        );
31
    }
32
}
33