Completed
Pull Request — master (#42)
by Andreas
06:29
created

RequestMismatchException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromMatcherException() 0 8 1
A create() 0 4 1
1
<?php
2
3
namespace Http\Mock\Exception;
4
5
class RequestMismatchException extends \RuntimeException
6
{
7
    /**
8
     * @param \Exception $exception
9
     *
10
     * @return self
11
     */
12
    public static function fromMatcherException(\Exception $exception)
13
    {
14
        return new self(
15
            'Expected a different request to be sent.',
16
            0,
17
            $exception
18
        );
19
    }
20
21
    /**
22
     * @return self
23
     */
24
    public static function create()
25
    {
26
        return new self('Expected a different request to be sent.');
27
    }
28
}
29