refactor: code style changes

Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
2023-01-15 00:04:00 +00:00
parent 25155bff2e
commit 3727c84f3e
146 changed files with 1013 additions and 1341 deletions

View File

@@ -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;
}
}