Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 13, 2023
1 parent a0ff6cc commit ec7fc9b
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,19 @@ protected function createMonologDriver(array $config)
$config['handler_with'] ?? []
);

$handler = $this->prepareHandler(
$this->app->make($config['handler'], $with), $config
);

$processors = collect($config['processors'] ?? [])
->map(fn ($processor) => $this->app->make($processor['processor'] ?? $processor, $processor['with'] ?? []))
->toArray();

return new Monolog(
$this->parseChannel($config),
[
$this->prepareHandler(
$this->app->make($config['handler'], $with), $config
),
],
collect($config['processors'] ?? [])
->map(fn ($processor) => $this->app->make($processor['processor'] ?? $processor, $processor['with'] ?? [])
)->toArray());
[$handler],
$processors,
);
}

/**
Expand Down

0 comments on commit ec7fc9b

Please sign in to comment.