Passed
Push — master ( 37709b...f45e89 )
by Aleksei
06:22 queued 17s
created

RetryContext   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __toString() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Core\Internal\Proxy;
6
7
/**
8
 * Used to wrap the resolving context to force Proxy Fallback Factory.
9
 *
10
 * @internal
11
 */
12
final class RetryContext implements \Stringable
13
{
14
    /**
15
     * @param \Stringable|string|null $context Original context.
16
     */
17 25
    public function __construct(
18
        public \Stringable|string|null $context = null,
19
    ) {
20 25
    }
21
22
    public function __toString(): string
23
    {
24
        return (string) $this->context;
25
    }
26
}
27