diff --git a/src/ComponentModel/Component.php b/src/ComponentModel/Component.php index b3af3df..e4adb34 100644 --- a/src/ComponentModel/Component.php +++ b/src/ComponentModel/Component.php @@ -90,11 +90,6 @@ final public function lookupPath(?string $type = null, bool $throw = true): ?str */ final public function monitor(string $type, ?callable $attached = null, ?callable $detached = null): void { - if (func_num_args() === 1) { - $attached = [$this, 'attached']; - $detached = [$this, 'detached']; - } - if ( ($obj = $this->lookup($type, throw: false)) && $attached @@ -121,7 +116,7 @@ final public function unmonitor(string $type): void * becomes attached to a monitored object. Do not call this method yourself. * @deprecated use monitor($type, $attached) */ - protected function attached(IComponent $obj): void + final protected function attached(IComponent $obj): void { } @@ -131,7 +126,7 @@ protected function attached(IComponent $obj): void * becomes detached from a monitored object. Do not call this method yourself. * @deprecated use monitor($type, null, $detached) */ - protected function detached(IComponent $obj): void + final protected function detached(IComponent $obj): void { }