ClosedCircuitBreaker   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A allowRequest() 0 3 1
A markAsSuccess() 0 2 1
A markAsFailure() 0 2 1
1
<?php
2
3
/**
4
 * This file is part of the bugloos/fault-tolerance-bundle project.
5
 * (c) Bugloos <https://bugloos.com/>
6
 * For the full copyright and license information, please view
7
 * the LICENSE file that was distributed with this source code.
8
 */
9
10
namespace Bugloos\FaultToleranceBundle\CircuitBreaker;
11
12
/**
13
 * @author Mojtaba Gheytasi <[email protected]>
14
 */
15
class ClosedCircuitBreaker
16
{
17
    /**
18
     * Request will always be allowed
19
     */
20
    public function allowRequest(): bool
21
    {
22
        return true;
23
    }
24
25
    public function markAsSuccess()
26
    {
27
    }
28
29
    public function markAsFailure()
30
    {
31
    }
32
}
33