Completed
Pull Request — master (#42)
by Andreas
03:30 queued 34s
created

RequestMismatchException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 24
ccs 7
cts 7
cp 1
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 2
    public static function fromMatcherException(\Exception $exception)
13
    {
14 2
        return new self(
15 2
            'Expected a different request to be sent.',
16 2
            0,
17 2
            $exception
18
        );
19
    }
20
21
    /**
22
     * @return self
23
     */
24 2
    public static function create()
25
    {
26 2
        return new self('Expected a different request to be sent.');
27
    }
28
}
29