HeaderKeyNotDefined   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A new() 0 10 1
1
<?php
2
3
namespace Transitions;
4
5
use LogicException;
6
7
class HeaderKeyNotDefined extends LogicException
8
{
9
10 3
    public static function new()
11
    {
12
13 3
        return new static(
14
            'A header key must be set in the transitions.php config file array ' .
15 3
            'under the `headerKey` key, to identify a request version.' . PHP_EOL .
16 3
            'see https://github.com/bbrothers/http-transitions#usage for details.' . PHP_EOL .
17 3
            "Example: `['headerKey' => 'Api-Version']"
18
        );
19
    }
20
}
21