Skip to content

Commit

Permalink
[5.5] Remove unused variables in Closures (laravel#22668)
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel authored and taylorotwell committed Jan 6, 2018
1 parent 3da5465 commit 9f4a0a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/Database/DatabaseQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@ public function testPaginateWithDefaultArguments()
$builder->shouldReceive('forPage')->once()->with($page, $perPage)->andReturnSelf();
$builder->shouldReceive('get')->once()->andReturn($results);

Paginator::currentPageResolver(function () use ($path) {
Paginator::currentPageResolver(function () {
return 1;
});

Expand Down Expand Up @@ -2328,7 +2328,7 @@ public function testPaginateWhenNoResults()
$builder->shouldNotReceive('forPage');
$builder->shouldNotReceive('get');

Paginator::currentPageResolver(function () use ($path) {
Paginator::currentPageResolver(function () {
return 1;
});

Expand Down
4 changes: 2 additions & 2 deletions tests/Events/EventsDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ public function testWildcardListenersCanBeFound()
public function testEventPassedFirstToWildcards()
{
$d = new Dispatcher;
$d->listen('foo.*', function ($event, $data) use ($d) {
$d->listen('foo.*', function ($event, $data) {
$this->assertEquals('foo.bar', $event);
$this->assertEquals(['first', 'second'], $data);
});
$d->fire('foo.bar', ['first', 'second']);

$d = new Dispatcher;
$d->listen('foo.bar', function ($first, $second) use ($d) {
$d->listen('foo.bar', function ($first, $second) {
$this->assertEquals('first', $first);
$this->assertEquals('second', $second);
});
Expand Down

0 comments on commit 9f4a0a8

Please sign in to comment.