Fixed deprecation notices on PHP 8.1
This commit is contained in:
1 parent
15a9081f3b
commit
321cdce5e2
3 files changed
+11
-6
No files matched your search
@@ -67,10 +67,10 @@ class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIter
|
||||
}
|
||||
|
||||
/**
|
||||
* @return static
|
||||
* This should be `static` for possible subclassing, but problems hinting that for PHP <8, also don't subclass this.
|
||||
*/
|
||||
public function getChildren() {
|
||||
public function getChildren(): self {
|
||||
|
||||
return new static( $this->children );
|
||||
return new self( $this->children );
|
||||
}
|
||||
}
|
||||
@@ -60,12 +60,14 @@ class Timeline_Iterator implements \Iterator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Key is unused and is only type hinted to possible `int` for PHP 8.1 `mixed` type compatibility.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return void
|
||||
* @return null
|
||||
*/
|
||||
public function key(): void {
|
||||
|
||||
public function key(): ?int {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user