KeepAliveRetryTransportWrapper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
ccs 1
cts 1
cp 1
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Gelf\Transport;
5
6
use RuntimeException;
7
use Throwable;
8
9
class KeepAliveRetryTransportWrapper extends RetryTransportWrapper
10
{
11
    private const NO_RESPONSE
12
        = "Graylog-Server didn't answer properly, expected 'HTTP/1.x 202 Accepted', response is ''";
13
14
    public function __construct(HttpTransport $transport)
15
    {
16
        parent::__construct($transport, 1, function (Throwable $e) {
17 4
            return $e instanceof RuntimeException && $e->getMessage() === self::NO_RESPONSE;
18
        });
19
    }
20
}
21