Skip to content

Commit 60bd5f0

Browse files
author
Andrey Helldar
authored
Added saving json file
1 parent 14e61c1 commit 60bd5f0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Services/File.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ public function loadJson(string $filename)
4646

4747
public function store(string $path)
4848
{
49+
if ($this->isJson($path)) {
50+
FileSupport::store(
51+
$path,
52+
json_encode($this->content, JSON_PRETTY_PRINT)
53+
);
54+
}
55+
4956
$content = Stub::replace(Stub::CONFIG_FILE, [
5057
'{{slot}}' => $this->content,
5158
]);

0 commit comments

Comments
 (0)