S2WConfigException::backupFail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
crap 1
1
<?php declare(strict_types=1);
2
3
namespace MazenTouati\Simple2wayConfig;
4
5
class S2WConfigException extends \RuntimeException
6
{
7
    const BACKUP_FAIL = 1;
8
9 1
    public static function backupFail($path): S2WConfigException
10
    {
11 1
        return new static(
12
            'Configuration sync is unable to save a backup for { '
13 1
            . $path . ' }, please check your permissions',
14 1
            self::BACKUP_FAIL
15
        );
16
    }
17
}
18