Completed
Pull Request — develop (#25)
by Barney
03:32
created

ResponseLoggerException::duringStart()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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\ResponseTimeLogger\Exception;
13
14
use Exception;
15
use RuntimeException;
16
17
/**
18
 * Class ResponseLoggerException.
19
 */
20
final class ResponseLoggerException extends RuntimeException
21
{
22
    const MSG_START = 'There was a problem logging the start of the Request to the ResponseLogger';
23
    const CODE_START = 256;
24
25
    /**
26
     * @param \Exception $e The previous exception
27
     *
28
     * @return ResponseLoggerException
29
     */
30
    public static function duringStart(Exception $e)
31
    {
32
        return new self(self::MSG_START, self::CODE_START, $e);
33
    }
34
}
35