Skip to content

Commit 796a793

Browse files
committed
[CS] Remove unused variables passed to closures
1 parent eb80377 commit 796a793

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Tests/ApplicationTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,8 +780,7 @@ public function testRunDispatchesIntegerExitCode()
780780

781781
// We can assume here that some other test asserts that the event is dispatched at all
782782
$dispatcher = new EventDispatcher();
783-
$self = $this;
784-
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) {
783+
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) {
785784
$passedRightValue = (4 === $event->getExitCode());
786785
});
787786

@@ -820,8 +819,7 @@ public function testRunDispatchesExitCodeOneForExceptionCodeZero()
820819

821820
// We can assume here that some other test asserts that the event is dispatched at all
822821
$dispatcher = new EventDispatcher();
823-
$self = $this;
824-
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($self, &$passedRightValue) {
822+
$dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) {
825823
$passedRightValue = (1 === $event->getExitCode());
826824
});
827825

0 commit comments

Comments
 (0)