AbstractService::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 2
1
<?php declare(strict_types=1);
2
3
namespace HolidayPirates\CircuitBreaker\Service;
4
5
abstract class AbstractService implements ServiceInterface
6
{
7
    private $maxFailures;
8
    private $retryTimeout;
9
10
    public function __construct(int $maxFailures, int $retryTimeout)
11
    {
12
        $this->maxFailures = $maxFailures;
13
        $this->retryTimeout = $retryTimeout;
14
    }
15
16
    public function getIdentifier(): string
17
    {
18
        return static::class;
19
    }
20
21
    public function getMaxFailures(): int
22
    {
23
        return $this->maxFailures;
24
    }
25
26
    public function getRetryTimeout(): int
27
    {
28
        return $this->retryTimeout;
29
    }
30
}
31