classes/CodeReview/PhpFileParser.php
protected function validateFileContents() {
		if (!$this->fileName) {
			throw new \LogicException("Missing file's path. Looks like severe internal error.");
		}
		$this->validateFilePath($this->fileName);
		if (!$this->sha1hash) {
			throw new \LogicException("Missing file's SHA1 hash. Looks like severe internal error.");
		}
		if ($this->sha1hash !== sha1_file($this->fileName)) {
			throw new IOException("The file on disk has changed and this " . get_class($this) . " class instance is no longer valid for use. Please create fresh instance.");
		}
		return true;
	}
protected function validateFileContents() {
		if (!$this->fileName) {
			throw new \LogicException("Missing file's path. Looks like severe internal error.");
		}
		$this->validateFilePath($this->fileName);
		if (!$this->sha1hash) {
			throw new \LogicException("Missing file's SHA1 hash. Looks like severe internal error.");
		}
		if ($this->sha1hash !== sha1_file($this->fileName)) {
			throw new IOException("The file on disk has changed and this " . get_class($this) . " class instance is no longer valid for use. Please create fresh instance.");
		}
		return true;
	}
protected function validateFileContents ( ) { if ( ! $ this -> fileName ) { throw new \ LogicException ( "Missing file's path. Looks like severe internal error." ) ; } $ this -> validateFilePath ( $ this -> fileName ) ; if ( ! $ this -> sha1hash ) { throw new \ LogicException ( "Missing file's SHA1 hash. Looks like severe internal error." ) ; } if ( $ this -> sha1hash !== sha1_file ( $ this -> fileName ) ) { throw new IOException ( "The file on disk has changed and this " . get_class ( $ this ) . " class instance is no longer valid for use. Please create fresh instance." ) ; } return true ; }
Uses SHA1 hash to determine if file contents has changed since analysis.

@return bool
@throws \CodeReview\IOException
@throws LogicException
Uses SHA1 hash to determine if file contents has changed since analysis .