Completed
Pull Request — master (#42)
by Andreas
05:56 queued 04:39
created

RequestMismatchException::fromMatcherException()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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