Skip to content

Commit

Permalink
Update docblocks and simplify code (#22658)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabialek authored and taylorotwell committed Jan 5, 2018
1 parent 99e9f78 commit 0573748
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct($app)
/**
* Get a log channel instance.
*
* @param string $driver
* @param string|null $channel
* @return mixed
*/
public function channel($channel = null)
Expand All @@ -79,7 +79,7 @@ public function channel($channel = null)
/**
* Get a log driver instance.
*
* @param string $driver
* @param string|null $driver
* @return mixed
*/
public function driver($driver = null)
Expand Down Expand Up @@ -167,15 +167,15 @@ protected function resolve($name)

if (isset($this->customCreators[$config['driver']])) {
return $this->callCustomCreator($config);
} else {
$driverMethod = 'create'.ucfirst($config['driver']).'Driver';

if (method_exists($this, $driverMethod)) {
return $this->{$driverMethod}($config);
} else {
throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
}
}

$driverMethod = 'create'.ucfirst($config['driver']).'Driver';

if (method_exists($this, $driverMethod)) {
return $this->{$driverMethod}($config);
}

throw new InvalidArgumentException("Driver [{$config['driver']}] is not supported.");
}

/**
Expand Down Expand Up @@ -264,7 +264,7 @@ protected function createErrorlogDriver(array $config)
* Prepare the handlers for usage by Monolog.
*
* @param array $handlers
* @return \Monolog\Handler\HandlerInterface
* @return array
*/
protected function prepareHandlers(array $handlers)
{
Expand Down

0 comments on commit 0573748

Please sign in to comment.