KamranAhmed\Smasher\Scanner::getScannedContent PHP Method

getScannedContent() protected method

Gets the scanned content from passed file
protected getScannedContent ( $path ) : array
$path
return array
    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;
    }