mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed code style.
This commit is contained in:
parent
1aed1d1d26
commit
9a7223a301
142 changed files with 534 additions and 716 deletions
|
@ -21,22 +21,21 @@
|
|||
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
|
||||
use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
|
||||
|
||||
class CustomEnvVarProcessor implements EnvVarProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getEnv($prefix, $name, \Closure $getEnv)
|
||||
{
|
||||
if ('validMailDSN' === $prefix) {
|
||||
try {
|
||||
$env = $getEnv($name);
|
||||
return !empty($env) && $env !== 'null://null';
|
||||
|
||||
return !empty($env) && 'null://null' !== $env;
|
||||
} catch (EnvNotFoundException $exception) {
|
||||
return false;
|
||||
}
|
||||
|
@ -44,7 +43,7 @@ class CustomEnvVarProcessor implements EnvVarProcessorInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function getProvidedTypes()
|
||||
{
|
||||
|
@ -52,4 +51,4 @@ class CustomEnvVarProcessor implements EnvVarProcessorInterface
|
|||
'validMailDSN' => 'bool',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue