refactor: code style changes
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
@@ -1,44 +1,38 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
use App\Facades\Options;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class SecuritySettingsService
|
||||
{
|
||||
|
||||
/**
|
||||
* Saves the app security settings.
|
||||
*
|
||||
* @param $policy
|
||||
* @param array $options
|
||||
* @param array $options
|
||||
* @return bool
|
||||
*/
|
||||
public function save($policy, $options = []) {
|
||||
|
||||
public function save($policy, $options = [])
|
||||
{
|
||||
$validPolicies = [
|
||||
'off',
|
||||
'low',
|
||||
'medium',
|
||||
'high'
|
||||
'high',
|
||||
];
|
||||
|
||||
if (in_array($policy, $validPolicies))
|
||||
{
|
||||
if (in_array($policy, $validPolicies)) {
|
||||
Options::changeOption('pw_security_policy', $policy);
|
||||
|
||||
Log::debug('[Options] Changing option pw_security_policy', [
|
||||
'new_value' => $policy
|
||||
'new_value' => $policy,
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
Log::debug('[WARN] Ignoring bogus policy', [
|
||||
'avaliable' => $validPolicies,
|
||||
'given' => $policy
|
||||
'given' => $policy,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -48,7 +42,5 @@ class SecuritySettingsService
|
||||
Options::changeOption('requireGameLicense', $options['requirePMC']);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user