EnvException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
ccs 7
cts 7
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 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