Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Zend/tests/foreach_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class IT extends ArrayIterator {
}
}

function rewind() {$this->trap(__FUNCTION__); return parent::rewind();}
function valid() {$this->trap(__FUNCTION__); return parent::valid();}
function key() {$this->trap(__FUNCTION__); return parent::key();}
function next() {$this->trap(__FUNCTION__); return parent::next();}
function rewind(): void {$this->trap(__FUNCTION__); parent::rewind();}
function valid(): bool {$this->trap(__FUNCTION__); return parent::valid();}
function key(): mixed {$this->trap(__FUNCTION__); return parent::key();}
function next(): void {$this->trap(__FUNCTION__); parent::next();}
}

foreach(['rewind', 'valid', 'key', 'next'] as $trap) {
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/iterator_key_by_ref.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Iterator::key() with by-ref return
--FILE--
<?php
class Test extends ArrayIterator {
#[ReturnTypeWillChange]
function &key() {
return $foo;
}
Expand Down
10 changes: 5 additions & 5 deletions ext/phar/tests/phar_oo_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@ class MyDirectoryIterator extends DirectoryIterator
parent::__construct($dir);
}

function rewind()
function rewind(): void
{
echo __METHOD__ . "\n";
parent::rewind();
}

function valid()
function valid(): bool
{
echo __METHOD__ . "\n";
return parent::valid();
}

function key()
function key(): mixed
{
echo __METHOD__ . "\n";
return parent::key();
}

function current()
function current(): mixed
{
echo __METHOD__ . "\n";
return parent::current();
}

function next()
function next(): void
{
echo __METHOD__ . "\n";
parent::next();
Expand Down
4 changes: 2 additions & 2 deletions ext/phar/tests/phar_oo_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ foreach($f as $k => $v)

class MyCSVFile extends SplFileObject
{
function current()
function current(): string|array|false
{
return parent::fgetcsv(',', '"');
}
Expand Down Expand Up @@ -62,7 +62,7 @@ foreach($v as $k => $d)

class MyCSVFile2 extends SplFileObject
{
function getCurrentLine()
function getCurrentLine(): string
{
echo __METHOD__ . "\n";
return implode('|', parent::fgetcsv(',', '"'));
Expand Down
Loading