Skip to content

Commit

Permalink
Inject cache
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Oct 14, 2023
1 parent bce7161 commit 0d04817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Support/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ final class Fields
*/
private WeakMap $cache;

private function __construct()
private function __construct(WeakMap $cache = new WeakMap)
{
$this->cache = new WeakMap();
$this->cache = $cache;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Support/Includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ final class Includes
*/
private WeakMap $cache;

private function __construct()
private function __construct(WeakMap $cache = new WeakMap)
{
$this->cache = new WeakMap();
$this->cache = $cache;
}

/**
Expand Down

0 comments on commit 0d04817

Please sign in to comment.