Code Duplication    Length = 10-10 lines in 2 locations

src/Handler/StartTimer.php 1 location

@@ 41-50 (lines=10) @@
38
     *
39
     * @return \Shrikeh\GuzzleMiddleware\TimerLogger\Handler\StartTimer
40
     */
41
    public static function createFrom(
42
        ResponseTimeLoggerInterface $responseTimeLogger,
43
        ExceptionHandlerInterface $exceptionHandler = null
44
    ) {
45
        if (!$exceptionHandler) {
46
            $exceptionHandler = new NullExceptionHandler();
47
        }
48
49
        return new self($responseTimeLogger, $exceptionHandler);
50
    }
51
52
    /**
53
     * StartTimer constructor.

src/Handler/StopTimer.php 1 location

@@ 42-51 (lines=10) @@
39
     *
40
     * @return StopTimer
41
     */
42
    public static function createFrom(
43
        ResponseTimeLoggerInterface $responseTimeLogger,
44
        ExceptionHandlerInterface $exceptionHandler = null
45
    ) {
46
        if (!$exceptionHandler) {
47
            $exceptionHandler = new NullExceptionHandler();
48
        }
49
50
        return new self($responseTimeLogger, $exceptionHandler);
51
    }
52
53
    /**
54
     * StopTimer constructor.