Passed
Push — develop ( ec1e42...80559e )
by Brent
03:22
created

InvalidConfiguration::fileNotFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Stitcher\Exception;
4
5
class InvalidConfiguration extends \Exception
6
{
7 2
    public static function pageIdAndTemplateRequired(): InvalidConfiguration
8
    {
9 2
        return new self('To create a page, both the `id` and `template` keys are required.');
10
    }
11
12
    public static function fileNotFound(string $path): InvalidConfiguration
13
    {
14
        return new self("File with path `{$path}` could not be found.");
15
    }
16
17
    public static function invalidAdapterConfiguration(string $adapter, string $fields): InvalidConfiguration
18
    {
19
        return new self("The {$adapter} adapter requires following configuration: {$fields}");
20
    }
21
}
22