ClientException::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 2
nc 1
nop 3
crap 2
1
<?php
2
3
namespace DMT\WebservicesNl\Client\Exception;
4
5
/**
6
 * Class ClientException
7
 *
8
 * @package DMT\WebservicesNl\Client
9
 */
10
class ClientException extends \RuntimeException implements ExceptionInterface
11
{
12
    /**
13
     * @static string The default message for this exception
14
     */
15
    const MESSAGE = 'General error, caused by the client.';
16
17
    /**
18
     * ClientException constructor.
19
     *
20
     * @param string $message
21
     * @param int $code
22
     * @param \Throwable|null $previous
23
     */
24 28
    public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
25
    {
26 28
        parent::__construct(strlen($message) ? $message : static::MESSAGE, $code, $previous);
27 28
    }
28
}
29