Exception   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 3
c 2
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A requestError() 0 3 1
A serviceUnavailable() 0 3 1
1
<?php
2
3
namespace DansMaCulotte\Colissimo\Exceptions;
4
5
class Exception extends \RuntimeException
6
{
7
    public static function serviceUnavailable(): Exception
8
    {
9
        return new self("Colissimo Web Service is unavailable");
10
    }
11
    
12
    public static function requestError(string $message): Exception
13
    {
14
        return new self("Request returned error: ${message}");
15
    }
16
}
17