InvalidOrderAdapter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 21 1
1
<?php
2
3
namespace Stitcher\Exception;
4
5
class InvalidOrderAdapter extends StitcherException
6
{
7
    public static function create(): InvalidOrderAdapter
8
    {
9
        return new self(
10
            'The `order` adapter requires following configuration: `variable`, `field` and `direction` optionally.',
11
            <<<MD
12
Take a look at the following example.
13
14
```yaml
15
/page
16
    # ...
17
    variables:
18
        posts: src/blog.yaml
19
    config:
20
        order:
21
            variable: posts
22
            field: date
23
            direction: desc|asc
24
```
25
MD
26
        );
27
    }
28
}
29