* The return value will be casted to boolean if non-boolean was returned.
* @since 5.0.0
*/
- public function offsetExists(mixed $offset): bool
+ public function offsetExists($offset): bool
{
return isset($this->page[$offset]);
}
* @return mixed Can return all value types.
* @since 5.0.0
*/
- public function offsetGet(mixed $offset): mixed
+ public function offsetGet($offset)
{
return $this->page[$offset] ?? null;
}
* @return void
* @since 5.0.0
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value)
{
$this->page[$offset] = $value;
}
* @return void
* @since 5.0.0
*/
- public function offsetUnset(mixed $offset): void
+ public function offsetUnset($offset)
{
if (isset($this->page[$offset])) {
unset($this->page[$offset]);
/**
* @inheritDoc
*/
- public function offsetSet(mixed $offset, mixed $value): void
+ public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->totalCount++;
/**
* @inheritDoc
*/
- public function offsetUnset(mixed $offset): void
+ public function offsetUnset($offset)
{
if ($this->offsetExists($offset)) {
$this->totalCount--;
return [];
}
- $blocked = $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked');
- if (!empty($blocked)) {
- $str_blocked = str_replace(["\n", "\r"], ",", $blocked);
- }
+ $str_blocked = str_replace(["\n", "\r"], ",", $this->pConfig->get($this->session->getLocalUserId(), 'system', 'blocked'));
if (empty($str_blocked)) {
return [];
}
$gdirpath = 'directory';
- if (empty(DI::config()->get('system', 'singleuser'))) {
+ if (strlen(DI::config()->get('system', 'singleuser'))) {
$gdir = DI::config()->get('system', 'directory');
if (strlen($gdir)) {
$gdirpath = Profile::zrl($gdir, true);
return true;
}
- public function read($id): string|false
+ public function read($id)
{
if (empty($id)) {
return '';
}
}
- public function gc($max_lifetime): int|false
+ public function gc($max_lifetime): bool
{
try {
return $this->dba->delete('session', ["`expire` < ?", time()]);
$port = trim($serverdata[1]);
}
- if (!empty(trim((string) $this->configCache->get('database', 'port')))) {
+ if (!empty(trim($this->configCache->get('database', 'port')))) {
$port = trim($this->configCache->get('database', 'port'));
}
* @see Iterator::next()
* @return void
*/
- public function next(): void
+ public function next()
{
$parsed = $this->read();
* @see Iterator::rewind()
* @return void
*/
- public function rewind(): void
+ public function rewind()
{
$this->value = null;
$this->reader->rewind();
* @see Iterator::current()
* @return ?ParsedLogLing
*/
- public function current(): mixed
+ public function current()
{
return $this->value;
}