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

RetryContext::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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