mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Fixed some deprecation notices.
This commit is contained in:
parent
2fc44c91e6
commit
d9d7e09866
4 changed files with 4 additions and 4 deletions
|
@ -87,7 +87,7 @@ abstract class AbstractDBElement implements \JsonSerializable
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize()
|
public function jsonSerialize(): array
|
||||||
{
|
{
|
||||||
return ['@id' => $this->getID()];
|
return ['@id' => $this->getID()];
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ final class StructuralDBElementIterator extends ArrayIterator implements Recursi
|
||||||
return !empty($element->getSubelements());
|
return !empty($element->getSubelements());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getChildren()
|
public function getChildren(): StructuralDBElementIterator
|
||||||
{
|
{
|
||||||
/** @var AbstractStructuralDBElement $element */
|
/** @var AbstractStructuralDBElement $element */
|
||||||
$element = $this->current();
|
$element = $this->current();
|
||||||
|
|
|
@ -233,7 +233,7 @@ final class TreeViewNode implements JsonSerializable
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize()
|
public function jsonSerialize(): array
|
||||||
{
|
{
|
||||||
$ret = [
|
$ret = [
|
||||||
'text' => $this->text,
|
'text' => $this->text,
|
||||||
|
|
|
@ -63,7 +63,7 @@ final class TreeViewNodeIterator extends ArrayIterator implements RecursiveItera
|
||||||
return !empty($element->getNodes());
|
return !empty($element->getNodes());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getChildren()
|
public function getChildren(): TreeViewNodeIterator
|
||||||
{
|
{
|
||||||
/** @var TreeViewNode $element */
|
/** @var TreeViewNode $element */
|
||||||
$element = $this->current();
|
$element = $this->current();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue