Completed
Push — develop ( cc8c81...372a4c )
by Barney
14s
created

ResponseLogStartException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A start() 0 6 1
1
<?php
2
/**
3
 * @codingStandardsIgnoreStart
4
 *
5
 * @author       Barney Hanlon <[email protected]>
6
 * @copyright    Barney Hanlon 2017
7
 * @license      https://opensource.org/licenses/MIT
8
 *
9
 * @codingStandardsIgnoreEnd
10
 */
11
12
namespace Shrikeh\GuzzleMiddleware\TimerLogger\ResponseLogger\Exception;
13
14
use Exception;
15
use RuntimeException;
16
17
/**
18
 * Class ResponseLogStartException.
19
 */
20
final class ResponseLogStartException extends RuntimeException
21
{
22
    const START_MSG = 'An error occurred while attempting to log the request start';
23
    const START_CODE = 4;
24
25
    /**
26
     * @param \Exception $e The previous exception
27
     *
28
     * @return ResponseLogStartException
29
     */
30
    public static function start(Exception $e)
31
    {
32
        return new self(
33
            self::START_MSG,
34
            self::START_CODE,
35
            $e
36
        );
37
    }
38
}
39