File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/internal/Magento/Framework/ObjectManager/Resetter Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
class Resetter implements ResetterInterface
20
20
{
21
+
22
+ public const RESET_PATH = '/app/etc/reset.php ' ;
23
+
21
24
/** @var WeakMap instances to be reset after request */
22
25
private WeakMap $ resetAfterWeakMap ;
23
26
@@ -50,7 +53,7 @@ class Resetter implements ResetterInterface
50
53
*/
51
54
public function __construct ()
52
55
{
53
- if (\file_exists (BP . ' /app/etc/reset.php ' )) {
56
+ if (\file_exists (BP . self :: RESET_PATH )) {
54
57
// phpcs:ignore Magento2.Security.IncludeFile.FoundIncludeFile
55
58
$ this ->classList = array_replace ($ this ->classList , (require BP . '/app/etc/reset.php ' ));
56
59
}
@@ -65,9 +68,7 @@ public function __construct()
65
68
*/
66
69
public function addInstance (object $ instance ) : void
67
70
{
68
- if ($ instance instanceof ResetAfterRequestInterface
69
- || isset ($ this ->classList [\get_class ($ instance )])
70
- ) {
71
+ if ($ instance instanceof ResetAfterRequestInterface || isset ($ this ->classList [\get_class ($ instance )])) {
71
72
$ this ->resetAfterWeakMap [$ instance ] = true ;
72
73
}
73
74
}
You can’t perform that action at this time.
0 commit comments