Passed
Push — dev ( b2cb78...4220b1 )
by Zach
03:18
created

ResourceAlreadyExists::fileExists()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace VueGenerators\Exceptions;
4
5
use Exception;
6
7
class ResourceAlreadyExists extends Exception
8
{
9
    /**
10
     * File of given name already exists at path.
11
     *
12
     * @param string $name
13
     *
14
     * @return static
15
     */
16
    public static function fileExists($name)
17
    {
18
        return new static(
19
            "File {$name} already exists at path."
20
        );
21
    }
22
}
23