fix: noverify --fix

This commit is contained in:
origami11@yandex.ru 2024-06-14 14:12:02 +03:00
parent 5aff28d2b8
commit 117640a755
44 changed files with 174 additions and 174 deletions

View file

@ -25,7 +25,7 @@ class Settings
$fileFormat = ['theme' => 'json'];
$extname = pathinfo($file, PATHINFO_EXTENSION);
$this->format = $format ? $format : Arr::get($fileFormat, $extname, $extname);
$this->format = $format ?: Arr::get($fileFormat, $extname, $extname);
$this->file = $file;
}
@ -40,7 +40,7 @@ class Settings
return false;
}
// Не include_once т.к читать настройки можно несколько раз
$settings = array();
$settings = [];
if ($this->format == 'json') {
$settings = json_decode(File::getContents($this->file), true);
} else {
@ -73,7 +73,7 @@ class Settings
$name = array_shift($key);
if (is_array($value)) {
if (!isset($data[$name])) {
$data[$name] = array();
$data[$name] = [];
}
$this->merge($data[$name], $value);
} else {
@ -88,7 +88,7 @@ class Settings
{
foreach ($value as $key => $subvalue) {
if (is_array($subvalue)) {
if (! isset($data[$key])) $data[$key] = array();
if (! isset($data[$key])) $data[$key] = [];
$this->merge($data[$key], $subvalue);
} else {
$data[$key] = $subvalue;
@ -132,7 +132,7 @@ class Settings
*/
public function readKeyList(...$key)
{
$result = array();
$result = [];
foreach ($this->data as $name => $value) {
$output = $this->readKeyData($key, $value);
if ($output) {