Completed
Push — master ( 22c0d0...a51b30 )
by Lars
02:03
created

PakkelabelsException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
/**
3
 * Pakkelabels
4
 *
5
 * PHP version 5
6
 *
7
 * @category  Pakkelabels
8
 * @package   Pakkelabels
9
 * @author    Lars Olesen <[email protected]>
10
 * @copyright 2015 Lars Olesen
11
 * @license   MIT Open Source License https://opensource.org/licenses/MIT
12
 * @version   GIT: <git_id>
13
 * @link      http://github.com/discimport/pakkelabels-dk
14
 */
15
16
namespace Pakkelabels\Exception;
17
18
use Exception;
19
20
/**
21
 * Class Pakkelabels\Exception
22
 *
23
 * @category  Pakkelabels
24
 * @package   Pakkelabels
25
 * @author    Lars Olesen <[email protected]>
26
 * @copyright 2015 Lars Olesen
27
 * @license   http://opensource.org/licenses/bsd-license.php New BSD License
28
 * @link      http://github.com/discimport/pakkelabels-dk
29
 */
30
class PakkelabelsException extends \Exception
31
{
32
    /**
33
     * Construct the exception.
34
     *
35
     * @param string $message Message returned by API for error.
36
     */
37
    public function __construct($message = null)
38
    {
39
        if (is_array($message)) {
40
            parent::__construct(implode(', ', $message));
41
        } else {
42
            parent::__construct($message);
43
        }
44
    }
45
}
46