Completed
Push — master ( b3febe...348067 )
by Zach
04:06 queued 02:03
created

WriteError   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A fileWriteFailed() 0 6 1
1
<?php
2
3
namespace Yarak\Exceptions;
4
5
use Exception;
6
7
class WriteError extends Exception
8
{
9
    /**
10
     * Writing to the filesystem failed.
11
     *
12
     * @param string $path
13
     *
14
     * @return static
15
     */
16
    public static function fileWriteFailed($e, $path = '')
17
    {
18
        $message = "Writing to {$path} failed."."\n".$e;
19
20
        return new static($message);
21
    }
22
}
23