Skip to content

Commit

Permalink
remove clear method from both Handlers and Observers registry
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfame committed Dec 27, 2024
1 parent 8efd826 commit 1bd9e01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions src/plugin/class-handlers-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,6 @@ public static function handle( SubjectType $type, Subject $subject ): void {
}
}

/**
* Remove all handlers for a type
*
* @param SubjectType $type The type to clear handlers for.
* @return void
*/
public static function clear( SubjectType $type ): void {
if ( isset( self::$handlers[ $type->value ] ) ) {
unset( self::$handlers[ $type->value ] );
}
}

/**
* Set user choice for what transformer to run for a subject type when multiples are registered
*
Expand Down
12 changes: 0 additions & 12 deletions src/plugin/class-observers-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,4 @@ public static function observe( SubjectType $type, Subject $subject ): void {
$registered_observer['observer']( $subject );
}
}

/**
* Remove all observers for a type
*
* @param SubjectType $type The type to clear observers for.
* @return void
*/
public static function clear( SubjectType $type ): void {
if ( isset( self::$observers[ $type->value ] ) ) {
unset( self::$observers[ $type->value ] );
}
}
}

0 comments on commit 1bd9e01

Please sign in to comment.