HeaderKeyNotDefined::new()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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