AbstractServerException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
4
namespace Beanie\Exception;
5
6
7
use Beanie\Server\Server;
8
9
abstract class AbstractServerException extends Exception
10
{
11
    const DEFAULT_MESSAGE = 'Error on server \'%s\'';
12
    const DEFAULT_CODE = 666;
13
14 5
    public function __construct(Server $server)
15
    {
16 5
        parent::__construct(
17 5
            sprintf(static::DEFAULT_MESSAGE, (string) $server),
18
            static::DEFAULT_CODE
19 5
        );
20 5
    }
21
}
22