mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-08 12:15:02 +02:00
Applied symplify rules to codebase.
This commit is contained in:
parent
2f20d90041
commit
388e847b17
136 changed files with 1370 additions and 789 deletions
|
@ -24,19 +24,20 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Services;
|
||||
|
||||
use Closure;
|
||||
use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
|
||||
|
||||
class CustomEnvVarProcessor implements EnvVarProcessorInterface
|
||||
final class CustomEnvVarProcessor implements EnvVarProcessorInterface
|
||||
{
|
||||
public function getEnv($prefix, $name, \Closure $getEnv)
|
||||
public function getEnv($prefix, $name, Closure $getEnv)
|
||||
{
|
||||
if ('validMailDSN' === $prefix) {
|
||||
try {
|
||||
$env = $getEnv($name);
|
||||
|
||||
return ! empty($env) && 'null://null' !== $env;
|
||||
} catch (EnvNotFoundException $exception) {
|
||||
} catch (EnvNotFoundException $envNotFoundException) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue