Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
brettmc committed Jun 22, 2022
1 parent 43fb070 commit 9099ff7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Benchmark/EventBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ public function __construct()
{
$this->listenerProvider = new SimpleListenerProvider();
$this->dispatcher = new SimpleDispatcher($this->listenerProvider);
$this->listener = function(){};
$this->listener = function () {
};
$this->event = new stdClass();
}

public function addEventsToListener(): void
{
for ($i=0; $i<10; $i++) {
$this->listenerProvider->listen('event_'.$i, $this->listener);
$this->listenerProvider->listen('event_' . $i, $this->listener);
}
$this->listenerProvider->listen(get_class($this->event), $this->listener);
}
Expand All @@ -41,7 +42,7 @@ public function addEventsToListener(): void
public function benchAddListeners(array $params): void
{
for ($i=0; $i<$params[0]; $i++) {
$this->listenerProvider->listen('event_'.$i, $this->listener);
$this->listenerProvider->listen('event_' . $i, $this->listener);
}
}

Expand Down Expand Up @@ -76,4 +77,4 @@ public function provideListenerCounts(): Generator
yield [16];
yield [256];
}
}
}

0 comments on commit 9099ff7

Please sign in to comment.