Completed
Pull Request — master (#6)
by Gregorio
02:13
created

ManagerException   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
c 0
b 0
f 0
dl 0
loc 45
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A undefinedTransformer() 0 3 1
A undefinedMatcher() 0 3 1
A undefinedPipe() 0 3 1
A undefinedMessage() 0 3 1
A undefinedConnector() 0 3 1
1
<?php
2
3
namespace Ghc\Rosetta\Exceptions;
4
5
use Exception;
6
7
class ManagerException extends Exception
8
{
9
    /**
10
     * @param $class
11
     * @return static
12
     */
13
    public static function undefinedConnector($class)
14
    {
15
        return new static("Connector class '$class' does not exists");
16
    }
17
18
    /**
19
     * @param $class
20
     * @return static
21
     */
22
    public static function undefinedMessage($class)
23
    {
24
        return new static("Message class '$class' does not exists");
25
    }
26
27
    /**
28
     * @param $class
29
     * @return static
30
     */
31
    public static function undefinedTransformer($class)
32
    {
33
        return new static("Transformer class '$class' does not exists");
34
    }
35
36
    /**
37
     * @param $class
38
     * @return static
39
     */
40
    public static function undefinedPipe($class)
41
    {
42
        return new static("Pipe class '$class' does not exists");
43
    }
44
45
    /**
46
     * @param $class
47
     * @return static
48
     */
49
    public static function undefinedMatcher($class)
50
    {
51
        return new static("Matcher class '$class' does not exists");
52
    }
53
}
54