Completed
Pull Request — master (#10)
by ARCANEDEV
08:32
created

InvalidImageRatingException::make()   A

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
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
crap 1
1
<?php namespace Arcanedev\Gravatar\Exceptions;
2
3
use InvalidArgumentException;
4
5
/**
6
 * Class     InvalidImageRatingException
7
 *
8
 * @package  Arcanedev\Gravatar\Exceptions
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class InvalidImageRatingException extends InvalidArgumentException
12
{
13 4
    public static function make(string $rating)
14
    {
15 4
        return new static(
16 4
            "Invalid rating '{$rating}' specified, only 'g', 'pg', 'r' or 'x' are supported."
17
        );
18
    }
19
}
20