Completed
Push — master ( 7e98cc...2d9b54 )
by ARCANEDEV
10s
created

InvalidProfileFormatException::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 10
ccs 6
cts 6
cp 1
crap 1
rs 9.9332
c 0
b 0
f 0
1
<?php namespace Arcanedev\Gravatar\Exceptions;
2
3
/**
4
 * Class     InvalidProfileFormatException
5
 *
6
 * @package  Arcanedev\Gravatar\Exceptions
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class InvalidProfileFormatException extends \InvalidArgumentException
10
{
11
    /**
12
     * Make a new exception.
13
     *
14
     * @param  string  $format
15
     * @param  array   $supportedFormat
16
     *
17
     * @return \Arcanedev\Gravatar\Exceptions\InvalidProfileFormatException
18
     */
19 4
    public static function make($format, array $supportedFormat)
20
    {
21 4
        return new static(
22 3
            sprintf(
23 4
                'The format [%s] is invalid, the supported formats are: %s',
24 2
                $format,
25 4
                implode(', ', $supportedFormat)
26
            )
27
        );
28
    }
29
}
30