ReflectionExceptionFactory   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 22
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidArgument() 0 4 1
A runtime() 0 4 1
A logic() 0 4 1
A reflectionInternal() 0 4 1
1
<?php
2
3
namespace DependencyInjection\Internal\Exception;
4
5
use \InvalidArgumentException;
6
use \RuntimeException;
7
use \LogicException;
8
use \ReflectionException;
9
10
class ReflectionExceptionFactory
11
{
12
    public static function invalidArgument($message, $code = 0)
13
    {
14
        return new \InvalidArgumentException($message, $code);
15
    }
16
17
    public static function runtime($message, $code = 0)
18
    {
19
        return new \RuntimeException($message, $code);
20
    }
21
22
    public static function logic($message, $code = 0)
23
    {
24
        return new \LogicException($message, $code);
25
    }
26
27
    public static function reflectionInternal($message, $code = 0)
28
    {
29
        return new \ReflectionException($message, $code);
30
    }
31
}
32