Completed
Push — master ( fc51f9...b3b654 )
by Freek
03:59
created

InvalidParameter::directoryDoesNotExist()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Spatie\Php7to5\Exceptions;
4
5
use Exception;
6
7
class InvalidParameter extends Exception
8
{
9
    public static function directoryDoesNotExist(string $directoryName) : self
10
    {
11
        return new static("Directory `{$directoryName}` does not exist");
12
    }
13
14
    public static function fileDoesNotExist(string $fileName) : self
15
    {
16
        return new static("File `{$fileName}` does not exist");
17
    }
18
19
    public static function directoryIsRequired() : self
20
    {
21
        return new static('A directory must be specified');
22
    }
23
}
24