Commit 90416571 authored by Euan游根明's avatar Euan游根明

perf: 格式代码

parent 85b8aee0
......@@ -214,10 +214,7 @@ class Nacos
if (!file_exists($path)) {
return '';
}
$data = json_decode(
file_get_contents($path),
true
);
$data = json_decode(file_get_contents($path), true);
if (empty($data)){
return '';
}
......@@ -236,10 +233,7 @@ class Nacos
$data[$key] = $value;
return file_put_contents($path, json_encode($data));
}
$data = json_decode(
file_get_contents($path),
true
);
$data = json_decode(file_get_contents($path), true);
$data[$key] = $value;
return file_put_contents(
$path,
......@@ -313,14 +307,8 @@ class Nacos
$data[] = $logData;
return file_put_contents($path, json_encode($data));
}
$data = json_decode(
file_get_contents($path),
true,
);
$data = json_decode(file_get_contents($path), true);
$data[] = $logData;
return file_put_contents(
$path,
json_encode($data),
);
return file_put_contents($path, json_encode($data));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment