We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
8 | trait ResettableContainerTrait { |
||
9 | |||
10 | /** |
||
11 | * Test if the entry given by $name has been initialized in the container. |
||
12 | * |
||
13 | * @param string $name Entry name or a class name. |
||
14 | * @return bool Whether or not the entry is initialized. |
||
15 | */ |
||
16 | public function initialized(string $name): bool { |
||
17 | return array_key_exists($name, $this->resolvedEntries); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Unset the entry given by $name in the container. |
||
22 | * |
||
23 | * A subsequent call to get() will create a new instance of this entry, |
||
24 | * according to its definition (if it has one). This can be useful to |
||
25 | * release resources that are no longer in use or that need to be reset. |
||
26 | * |
||
27 | * @param string $name Entry name or a class name. |
||
28 | */ |
||
29 | public function reset(string $name): void { |
||
31 | } |
||
32 | |||
34 |