Test for end-of-file on a file pointer

@return bool
359668
public function stream_eof()
    {
        if ($this->fileHandle === null) {
            return false;
        }
        self::restore();
        $success = feof($this->fileHandle);
        self::register();
        return $success;
    }
717396
public function hasFile()
    {
        foreach ($this->fields() as $field) {
            if ($field instanceof Field\File) {
                return true;
            }
        }

        return false;
    }
1145560
public function isFileEmpty()
    {
        $this->openFile();
        $saved_pointer = $this->getFilePointer();
        $this->rewindFile()->seekFileToEnd();
        $size_pointer = $this->getFilePointer();
        $this->seekFile($saved_pointer);

        return $size_pointer === 0;
    }
473710
private function hasReturnType(): bool
    {
        if ($this->hasReturnType === null) {
            $this->hasReturnType = FunctionHelper::hasReturnTypeHint($this->file->getBaseFile(), $this->stackPos);
        }

        return $this->hasReturnType;
    }
503738
public function hasTitleAFullStop(): bool
    {
        if (0 == $this->getTitleLength()) {
            return false;
        }

        $lastCharacter = trim($this->commitMessage[0]){$this->getTitleLength() - 1};

        return '.' == $lastCharacter;
    }
732410
public function getEnd() : ?string 
    {
        if ( ! $this->hasEnd()) {
            $this->setEnd($this->getDefaultEnd());
        }
        return $this->end;
    }
1065060
private function isFilenameEndingWithExtension($name)
	{
		return \strrpos($name, self::EXTENSION) === (\strlen($name) - self::EXTENSION_LENGTH);
	}
1084421
public static function end()
    {
        if (!self::$_page || ErrorHandling::lastError()) {
            return;
        }
        self::$_zones[self::$_outputZone]->append(ob_get_clean());
        self::$_page->output();

        // reset class
        self::$_page = null;
        self::$_zones = array();
        self::$_zoneStack = array();
        self::$_outputZone = 'body';

        echo '<!-- ';
        echo '~', Asbestos::executionTime();
        echo " -->\n";
    }
120932
public function eof() {
			if (!$this->hasRead) {
				$this->mark();

				$ret = fgetc($this->handle);

				if ($ret === false)
					return true;

				$this->reset();
			}

			return feof($this->handle);
		}
230416
private function fileSend()
    {
        $attemptCount = 0;
        $successCount = 0;
        if (isset($this->payload->operations)) {
            foreach ($this->payload->operations as $type => $operation) {
                if (is_object($operation)) {
                    ++$attemptCount;
                    $result = false;
                    $now    = new \DateTime();
                    $this->setLogs($now->format(\DateTime::ISO8601), $type.'started');
                    try {
                        switch ($type) {
                            case 'email':
                                $result = $this->operationEmail($operation);
                                break;

                            case 'ftp':
                                $result = $this->operationFtp($operation);
                                break;

                            case 'sftp':
                                $result = $this->operationSftp($operation);
                                break;

                            case 's3':
                                $result = $this->operationS3($operation);
                                break;
                        }
                    } catch (\Exception $e) {
                        $message = 'Unable to send file to '.$type.': '.$e->getMessage();
                        $this->setLogs($message, $type.'error');
                    }
                    if ($result) {
                        ++$successCount;
                    }
                }
            }
        }
        if (!$attemptCount) {
            $this->setLogs(
                'No file send operations are enabled. Please add a file send operation to be tested',
                'error'
            );
        } elseif ($successCount === $attemptCount) {
            $this->file->setStatus(File::STATUS_SENT);
            $this->valid = true;
        } elseif ($successCount < $attemptCount) {
            $this->file->setStatus(File::STATUS_ERROR);
            $this->valid = false;
        }
        $this->setLogs($this->file->getStatus(), 'fileStatus');
        $this->setLogs($this->valid, 'valid');
        $this->fileEntityAddLogs();
        $this->fileEntitySave();

        return $this;
    }
1083519
public function endsWith($string)
    {
        $string = StdObjectWrapper::toString($string);

        // calculate the end position
        $length = strlen($string);
        $endString = substr($this->val(), -$length);

        if ($string == $endString) {
            return true;
        }

        return false;
    }
368696
private function detectFrameEnd()
    {
        $bodySize = null;
        if ($this->expectedBodyLength) {
            if (($this->bufferSize - $this->offset) >= $this->expectedBodyLength) {
                $bodySize = $this->expectedBodyLength;
            }
        } elseif (($frameEnd = strpos($this->buffer, self::FRAME_END, $this->offset)) !== false) {
            $bodySize = $frameEnd - $this->offset;
        }

        if ($bodySize !== null) {
            $this->setFrame($bodySize);
            $this->offset += $bodySize + strlen(self::FRAME_END); // x00
        }
        return $bodySize !== null;
    }
291154
public function tell(): int
    {
        $position = ftell($this->handle);

        if (false === $position) {
            $message = 'Could not get file pointer position.';
            if ($error = error_get_last()) {
                $message .= sprintf(' Errno: %d; %s', $error['type'], $error['message']);
            }
            throw new FileException($message);
        }

        return $position;
    }
1272545
public function close()
    {
        if (false === $this->openned) {
            return false;
        }
        $this->pclzip = $this->filename = null;
        $this->openned = false;
        if (file_exists(self::TMP_DIR)) {
            $this->_rrmdir(self::TMP_DIR);
            rmdir(self::TMP_DIR);
        }
        return true;
    }
49623
public function isComplete()
    {
        if (!$this->buffer) {
            return false;
        }

        try {
            return $this->getBufferLength() >= $this->getExpectedBufferLength();
        } catch (FrameException $e) {
            return false;
        }
    }
514411
protected function _section_end()
    {
        $last = array_pop($this->_last_section);
        $this->_section_extend($last, ob_get_clean());

        return $last;
    }
636083
function last() {
		return $this->skip(($ofs=count($this->query)-$this->ptr)?$ofs-1:0);
	}