Skip to content

Commit 0d04817

Browse files
committed
Inject cache
1 parent bce7161 commit 0d04817

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Support/Fields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ final class Fields
2525
*/
2626
private WeakMap $cache;
2727

28-
private function __construct()
28+
private function __construct(WeakMap $cache = new WeakMap)
2929
{
30-
$this->cache = new WeakMap();
30+
$this->cache = $cache;
3131
}
3232

3333
/**

src/Support/Includes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ final class Includes
2424
*/
2525
private WeakMap $cache;
2626

27-
private function __construct()
27+
private function __construct(WeakMap $cache = new WeakMap)
2828
{
29-
$this->cache = new WeakMap();
29+
$this->cache = $cache;
3030
}
3131

3232
/**

0 commit comments

Comments
 (0)