public function getContent($path) { if (!file_exists($path)) { throw new FileNotFoundException($path); } if (is_dir($path) || !is_readable($path)) { throw new FileNotReadableException($path); } return file_get_contents($path); }
/** * @param string $path * * @return \HippoPHP\Hippo\CheckResult[] */ protected function checkPathFile($path) { $file = new File($path, $this->fileSystem->getContent($path)); $checkResults = $this->checkFile($file); if ($this->observer !== null) { call_user_func($this->observer, $file, $checkResults); } return $checkResults; }