Completed
Push — master ( 48e5b8...eb0757 )
by Tobias
20:40
created

MissingRequiredParameter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 2
1
<?php
2
3
/*
4
 * Copyright (C) 2013 Mailgun
5
 *
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Mailgun\Message\Exceptions;
11
12
use Mailgun\Exception;
13
14
class MissingRequiredParameter extends \Exception implements Exception
15
{
16
    public static function create($parameter, $message = null)
17
    {
18
        if (null === $message) {
19
            $message = 'The parameters passed to the API were invalid. Please specify "%s".';
20
        }
21
22
        return new self(sprintf($message, $parameter));
23
    }
24
}
25