protected function getScannedContent($path) { $this->path->setPath($path); $this->path->validate(); $content = $this->path->getFileContent(); if (empty($content)) { throw new NoContentException("The file ' . {$path} . ' has no content", 1); } $result = $this->response->decode($content); if (!is_array($result)) { throw new InvalidContentException("The content in file " . $path . " could not be processed", 1); } return $result; }