Completed
Pull Request — master (#12)
by ARCANEDEV
04:46
created

InvalidProfileFormatException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A make() 0 10 1
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