Completed
Push — master ( 003b5e...76542b )
by Woody
38:06 queued 22:13
created

EnvException::detectionFailed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
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
        ));
20
    }
21
22
    /**
23
     * @return static
24
     */
25 1
    public static function detectionFailed()
26
    {
27 1
        return new static(
28 1
            'Unable to automatically detect the location of a .env file'
29
        );
30
    }
31
}
32