Total Complexity | 6 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class SnapshotMiddleware |
||
13 | { |
||
14 | /** |
||
15 | * @var StrategyInterface |
||
16 | */ |
||
17 | private $strategy; |
||
18 | |||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | private $requestStorage = false; |
||
23 | |||
24 | 9 | public function __construct(StrategyInterface $strategy) |
|
25 | { |
||
26 | 9 | $this->strategy = $strategy; |
|
27 | 9 | } |
|
28 | |||
29 | 6 | public function __invoke(callable $handler): callable |
|
43 | ); |
||
44 | 9 | }; |
|
45 | } |
||
46 | |||
47 | 3 | public function setRequestStorage(bool $requestStorage): void |
|
48 | { |
||
49 | 3 | $this->requestStorage = $requestStorage; |
|
50 | 3 | } |
|
51 | |||
52 | 6 | private function onFulfilled(RequestInterface $request): callable |
|
58 | 9 | }; |
|
59 | } |
||
60 | } |
||
61 |