(?string $path = null, ?string $raw = null)
| 27 | ) {} |
| 28 | |
| 29 | public function import(?string $path = null, ?string $raw = null): int|array { |
| 30 | if ($path !== null && $path !== '') $raw = $this->rootFolder->getUserFolder($this->userId)->get($path)->getContent(); |
| 31 | if ($raw === null) return 0; |
| 32 | $data = json_decode($raw, true); |
| 33 | if (is_array($data) && array_key_exists('format', $data)) return $this->importBundle($data); |
| 34 | return $this->reports->import(null, $raw); |
| 35 | } |
| 36 | |
| 37 | public function installDemo(): array { |
| 38 | $key = 'analytics-demo-' . $this->userId; |
nothing calls this directly
no test coverage detected