EnvException::invalidFile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Equip\Exception;
4
5
use InvalidArgumentException;
6
7
class EnvException extends InvalidArgumentException
8
{
9
    /**
10
     * @param string $path
11
     *
12
     * @return static
13
     */
14 1
    public static function invalidFile($path)
15
    {
16 1
        return new static(sprintf(
17 1
            'Environment file `%s` does not exist or is not readable',
18
            $path
19 1
        ));
20
    }
21
22
    /**
23
     * @return static
24
     */
25 1
    public static function detectionFailed()
26
    {
27 1
        return new static(
28
            'Unable to automatically detect the location of a .env file'
29 1
        );
30
    }
31
}
32