<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$this->fh = fopen($filename, 'r');
if (!$this->fh) {
// this should use a custom exception.
- throw \Exception("Unable to open $filename");
+ throw new \Exception("Unable to open $filename");
}
$this->filesize = filesize($filename);
$this->pos = -1;
*
* @return string|null Depending on data being buffered
*/
- private function _readline()
+ private function _readline(): ?string
{
$buffer = & $this->buffer;
while (true) {
* @see Iterator::next()
* @return void
*/
+ #[\ReturnTypeWillChange]
public function next()
{
++$this->key;
* @see Iterator::rewind()
* @return void
*/
+ #[\ReturnTypeWillChange]
public function rewind()
{
if ($this->filesize > 0) {
}
/**
- * Checks if current iterator value is valid, that is, we readed all lines in files
+ * Checks if current iterator value is valid, that is, we read all lines in files
*
* @see Iterator::valid()
* @return bool