InvalidPaginationAdapter::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 21
ccs 0
cts 4
cp 0
crap 2
rs 9.584
c 0
b 0
f 0
1
<?php
2
3
namespace Stitcher\Exception;
4
5
class InvalidPaginationAdapter extends StitcherException
6
{
7
    public static function create(): InvalidPaginationAdapter
8
    {
9
        return new self(
10
            'The `pagination` adapter requires following configuration: `variable`, `parameter` and `perPage`',
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
        pagination:
21
            variable: posts
22
            perPage: 7
23
            parameter: page
24
```
25
MD
26
        );
27
    }
28
}
29