ServerException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 9
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: famoser
5
 * Date: 07.11.2016
6
 * Time: 11:12
7
 */
8
9
namespace Famoser\XKCDCache\Exceptions;
10
11
12
use Exception;
13
use Famoser\XKCDCache\Types\ServerError;
14
15
/**
16
 * a server exception occurs, if a critical action on the server fails (like saving to the database)
17
 * but the user has no way of changing anything of that behaviour. The user should not receive an unhelpful
18
 * error message, but rather a 'sorry, but we can't continue' kind of behaviour
19
 * @package Famoser\XKCDCache\Exceptions
20
 */
21
class ServerException extends Exception
22
{
23
    /**
24
     * ServerException constructor.
25
     * @param int $serverError
26
     */
27 2
    public function __construct(int $serverError)
28
    {
29 2
        parent::__construct(ServerError::toString($serverError), $serverError, null);
30 2
    }
31
}
32