Skip to content

Commit daa479e

Browse files
fix(json): remove non ready code
1 parent a790181 commit daa479e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Helpers/Json.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,14 @@ public function getContents()
120120
*/
121121
public function getAttributes()
122122
{
123-
$themeAttributes = json_decode($this->getContents(), 1);
123+
$attributes = json_decode($this->getContents(), 1);
124124

125125
// any JSON parsing errors should throw an exception
126126
if (json_last_error() > 0) {
127127
throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg());
128128
}
129129

130-
if (config('themes-manager.cache.enabled', false) === false) {
131-
return $themeAttributes;
132-
}
133-
134-
return app('cache')->remember($this->getPath(), config('themes-manager.cache.lifetime'), function () use ($themeAttributes) {
135-
return $themeAttributes;
136-
});
130+
return $attributes;
137131
}
138132

139133
/**

0 commit comments

Comments
 (0)