Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 23, 2021
1 parent ecab4b7 commit 003d511
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 29 deletions.
12 changes: 3 additions & 9 deletions src/Event/DeferredDispatcher.php
Expand Up @@ -12,21 +12,15 @@
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class DeferredDispatcher implements SubscriberSupportingDispatcher, TracerSupportingDispatcher
final class DeferredDispatcher implements SubscribableDispatcher
{
/**
* @psalm-var SubscriberSupportingDispatcher&TracerSupportingDispatcher
*/
private Dispatcher $dispatcher;
private SubscribableDispatcher $dispatcher;

private EventCollection $events;

private bool $recording = true;

/**
* @psalm-param SubscriberSupportingDispatcher&TracerSupportingDispatcher $dispatcher
*/
public function __construct(Dispatcher $dispatcher)
public function __construct(SubscribableDispatcher $dispatcher)
{
$this->dispatcher = $dispatcher;
$this->events = new EventCollection;
Expand Down
2 changes: 1 addition & 1 deletion src/Event/DirectDispatcher.php
Expand Up @@ -15,7 +15,7 @@
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class DirectDispatcher implements SubscriberSupportingDispatcher, TracerSupportingDispatcher
final class DirectDispatcher implements SubscribableDispatcher
{
private TypeMap $typeMap;

Expand Down
Expand Up @@ -12,10 +12,12 @@
/**
* @internal This interface is not covered by the backward compatibility promise for PHPUnit
*/
interface SubscriberSupportingDispatcher extends Dispatcher
interface SubscribableDispatcher extends Dispatcher
{
/**
* @throws UnknownSubscriberTypeException
*/
public function registerSubscriber(Subscriber $subscriber): void;

public function registerTracer(Tracer\Tracer $tracer): void;
}
18 changes: 0 additions & 18 deletions src/Event/TracerSupportingDispatcher.php

This file was deleted.

0 comments on commit 003d511

Please sign in to comment.