MissingArgumentException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace Trello\Exception;
4
5
/**
6
 * MissingArgumentException
7
 *
8
 * @author Joseph Bielawski <[email protected]>
9
 */
10
class MissingArgumentException extends ErrorException
11
{
12
    /**
13
     * @param string $required
14
     */
15 21
    public function __construct($required, $code = 0, $previous = null)
16
    {
17 21
        if (is_string($required)) {
18 21
            $required = array($required);
19 21
        }
20
21 21
        parent::__construct(sprintf('One or more of required ("%s") parameters are missing!', implode('", "', $required)), $code, $previous);
22 21
    }
23
}
24