WriterException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fileExistException() 0 4 1
A writeFailureException() 0 4 1
1
<?php
2
3
namespace Glooby\Debug\Exception;
4
5
/**
6
 * @author Emil Kilhage
7
 */
8
class WriterException extends Exception
9
{
10
    /**
11
     * @param string $filePath
12
     * @return WriterException
13
     */
14
    public static function fileExistException($filePath)
15
    {
16
        return new self("file already exist: $filePath");
17
    }
18
19
    /**
20
     * @param string $filePath
21
     * @return WriterException
22
     */
23
    public static function writeFailureException($filePath)
24
    {
25
        return new self("unable to write to file: $filePath");
26
    }
27
}
28