Skip to content

[12.x] style: remove unnecessary curly braces in string interpolations #55896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Illuminate/Auth/AuthManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function resolve($name)
$config = $this->getConfig($name);

if (is_null($config)) {
throw new InvalidArgumentException("Auth guard [{$name}] is not defined.");
throw new InvalidArgumentException("Auth guard [$name] is not defined.");
}

if (isset($this->customCreators[$config['driver']])) {
Expand All @@ -96,7 +96,7 @@ protected function resolve($name)
}

throw new InvalidArgumentException(
"Auth driver [{$config['driver']}] for guard [{$name}] is not defined."
"Auth driver [{$config['driver']}] for guard [$name] is not defined."
);
}

Expand Down Expand Up @@ -184,7 +184,7 @@ public function createTokenDriver($name, $config)
*/
protected function getConfig($name)
{
return $this->app['config']["auth.guards.{$name}"];
return $this->app['config']["auth.guards.$name"];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Log/LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ protected function resolve($name, ?array $config = null)
$config ??= $this->configurationFor($name);

if (is_null($config)) {
throw new InvalidArgumentException("Log [{$name}] is not defined.");
throw new InvalidArgumentException("Log [$name] is not defined.");
}

if (isset($this->customCreators[$config['driver']])) {
Expand Down Expand Up @@ -558,7 +558,7 @@ protected function getFallbackChannelName()
*/
protected function configurationFor($name)
{
return $this->app['config']["logging.channels.{$name}"];
return $this->app['config']["logging.channels.$name"];
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Mail/MailManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected function resolve($name)
$config = $this->getConfig($name);

if (is_null($config)) {
throw new InvalidArgumentException("Mailer [{$name}] is not defined.");
throw new InvalidArgumentException("Mailer [$name] is not defined.");
}

// Once we have created the mailer instance we will set a container instance
Expand Down Expand Up @@ -174,7 +174,7 @@ public function createSymfonyTransport(array $config)

if (trim($transport ?? '') === '' ||
! method_exists($this, $method = 'create'.ucfirst(Str::camel($transport)).'Transport')) {
throw new InvalidArgumentException("Unsupported mail transport [{$transport}].");
throw new InvalidArgumentException("Unsupported mail transport [$transport].");
}

return $this->{$method}($config);
Expand Down