Completed
Pull Request — master (#42)
by Andreas
04:16
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
use Psr\Http\Message\RequestInterface;
6
7
class RequestMismatchException extends \RuntimeException
8
{
9
    /**
10
     * @param \Exception $exception
11
     *
12
     * @return self
13
     */
14 2
    public static function fromMatcherException(\Exception $exception)
15
    {
16 2
        return new self(
17 2
            'Expected a different request to be sent.',
18 2
            0,
19 2
            $exception
20
        );
21
    }
22
23
    /**
24
     * @return self
25
     */
26 2
    public static function create()
27
    {
28 2
        return new self('Expected a different request to be sent.');
29
    }
30
}
31