Completed
Push — master ( c9c9d6...9f49ce )
by Zach
02:07
created

FileNotFound   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A servicesFileNotFound() 0 7 1
A migrationFileNotFound() 0 6 1
1
<?php
2
3
namespace Yarak\Exceptions;
4
5
use Exception;
6
7
class FileNotFound extends Exception
8
{
9
    /**
10
     * The services file can not be resolved.
11
     *
12
     * @param string $additional
13
     *
14
     * @return static
15
     */
16
    public static function servicesFileNotFound($additional = '')
17
    {
18
        return new static(
19
            'The services file could not be found at app/config/services.php. '.
20
            $additional
21
        );
22
    }
23
24
    /**
25
     * The migration file can not be found.
26
     *
27
     * @param string $migrationFileName
28
     *
29
     * @return static
30
     */
31
    public static function migrationFileNotFound($migrationFileName, $path)
32
    {
33
        return new static(
34
            "The migration file {$migrationFileName} could not be found at {$path}"
35
        );
36
    }
37
}
38