public function getJsonContents($theme) { $theme = strtolower($theme); $default = []; if (!$this->exists($theme)) { return $default; } $path = $this->getJsonPath($theme); if ($this->files->exists($path)) { $contents = $this->files->get($path); return json_decode($contents, true); } else { $message = "Theme [{$theme}] must have a valid theme.json manifest file."; throw new FileMissingException($message); } }