@@ -101,9 +101,9 @@ final public function monitor(string $type, ?callable $attached = null, ?callabl
101101 }
102102
103103 if (
104- ($ obj = $ this ->lookup ($ type , false ))
104+ ($ obj = $ this ->lookup ($ type , throw: false ))
105105 && $ attached
106- && !in_array ([$ attached , $ detached ], $ this ->monitors [$ type ][3 ], true )
106+ && !in_array ([$ attached , $ detached ], $ this ->monitors [$ type ][3 ], strict: true )
107107 ) {
108108 $ attached ($ obj );
109109 }
@@ -252,7 +252,7 @@ private function refreshMonitors(int $depth, ?array &$missing = null, array &$li
252252
253253 } else {
254254 unset($ this ->monitors [$ type ]); // forces re-lookup
255- if ($ obj = $ this ->lookup ($ type , false )) {
255+ if ($ obj = $ this ->lookup ($ type , throw: false )) {
256256 foreach ($ rec [3 ] as $ pair ) {
257257 $ listeners [] = [$ pair [0 ], $ obj ];
258258 }
@@ -268,7 +268,7 @@ private function refreshMonitors(int $depth, ?array &$missing = null, array &$li
268268 if ($ depth === 0 ) { // call listeners
269269 $ prev = [];
270270 foreach ($ listeners as $ item ) {
271- if ($ item [0 ] && !in_array ($ item , $ prev , true )) {
271+ if ($ item [0 ] && !in_array ($ item , $ prev , strict: true )) {
272272 $ item [0 ]($ item [1 ]);
273273 $ prev [] = $ item ;
274274 }
0 commit comments