Skip to content

Commit

Permalink
Component: deprecated attached & detached are final
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 8, 2023
1 parent caac9c8 commit 7ec035d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ComponentModel/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
{
}

Expand All @@ -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
{
}

Expand Down

0 comments on commit 7ec035d

Please sign in to comment.