|
11 | 11 | */ |
12 | 12 | final class ContextStorageNode implements ScopeInterface, ContextStorageScopeInterface |
13 | 13 | { |
14 | | - public ContextInterface $context; |
15 | | - public ContextStorageHead $head; |
16 | | - private ?ContextStorageNode $previous; |
17 | 14 | private array $localStorage = []; |
18 | 15 |
|
19 | 16 | public function __construct( |
20 | | - ContextInterface $context, |
21 | | - ContextStorageHead $head, |
22 | | - ?ContextStorageNode $previous = null |
| 17 | + public ContextInterface $context, |
| 18 | + public ContextStorageHead $head, |
| 19 | + private ?ContextStorageNode $previous = null, |
23 | 20 | ) { |
24 | | - $this->context = $context; |
25 | | - $this->head = $head; |
26 | | - $this->previous = $previous; |
27 | 21 | } |
28 | 22 |
|
29 | 23 | public function offsetExists($offset): bool |
@@ -76,8 +70,8 @@ public function detach(): int |
76 | 70 |
|
77 | 71 | assert($this->head->node !== null); |
78 | 72 | for ($n = $this->head->node, $depth = 1; |
79 | | - $n->previous !== $this; |
80 | | - $n = $n->previous, $depth++) { |
| 73 | + $n->previous !== $this; |
| 74 | + $n = $n->previous, $depth++) { |
81 | 75 | assert($n->previous !== null); |
82 | 76 | } |
83 | 77 | $n->previous = $this->previous; |
|
0 commit comments