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

EnvException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidFile() 0 7 1
A detectionFailed() 0 6 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