Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nacos-config
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Euan游根明
nacos-config
Commits
90416571
Commit
90416571
authored
Nov 30, 2023
by
Euan游根明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 格式代码
parent
85b8aee0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
Nacos.php
src/Nacos/Nacos.php
+4
-16
No files found.
src/Nacos/Nacos.php
View file @
90416571
...
@@ -214,10 +214,7 @@ class Nacos
...
@@ -214,10 +214,7 @@ class Nacos
if
(
!
file_exists
(
$path
))
{
if
(
!
file_exists
(
$path
))
{
return
''
;
return
''
;
}
}
$data
=
json_decode
(
$data
=
json_decode
(
file_get_contents
(
$path
),
true
);
file_get_contents
(
$path
),
true
);
if
(
empty
(
$data
)){
if
(
empty
(
$data
)){
return
''
;
return
''
;
}
}
...
@@ -236,10 +233,7 @@ class Nacos
...
@@ -236,10 +233,7 @@ class Nacos
$data
[
$key
]
=
$value
;
$data
[
$key
]
=
$value
;
return
file_put_contents
(
$path
,
json_encode
(
$data
));
return
file_put_contents
(
$path
,
json_encode
(
$data
));
}
}
$data
=
json_decode
(
$data
=
json_decode
(
file_get_contents
(
$path
),
true
);
file_get_contents
(
$path
),
true
);
$data
[
$key
]
=
$value
;
$data
[
$key
]
=
$value
;
return
file_put_contents
(
return
file_put_contents
(
$path
,
$path
,
...
@@ -313,14 +307,8 @@ class Nacos
...
@@ -313,14 +307,8 @@ class Nacos
$data
[]
=
$logData
;
$data
[]
=
$logData
;
return
file_put_contents
(
$path
,
json_encode
(
$data
));
return
file_put_contents
(
$path
,
json_encode
(
$data
));
}
}
$data
=
json_decode
(
$data
=
json_decode
(
file_get_contents
(
$path
),
true
);
file_get_contents
(
$path
),
true
,
);
$data
[]
=
$logData
;
$data
[]
=
$logData
;
return
file_put_contents
(
return
file_put_contents
(
$path
,
json_encode
(
$data
));
$path
,
json_encode
(
$data
),
);
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment