Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Avoid using call_user_func.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 16, 2016
1 parent 07f0cd2 commit f6725ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DebugServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected function registerEvents()
{
$this->app['events']->listen('orchestra.debug: attaching', function ($monolog) {
foreach (['Database', 'Request'] as $event) {
call_user_func([$this, "register{$event}Logger"], $monolog);
$this->{"register{$event}Logger"}($monolog);
}
});
}
Expand All @@ -92,7 +92,7 @@ public function registerDatabaseLogger(Logger $monolog)
};

foreach ($db->getQueryLog() as $query) {
call_user_func($callback, new QueryExecuted($query['query'], $query['bindings'], $query['time'], $db));
$callback(new QueryExecuted($query['query'], $query['bindings'], $query['time'], $db));
}

$this->app->make('events')->listen(QueryExecuted::class, $callback);
Expand Down

0 comments on commit f6725ef

Please sign in to comment.