Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions src/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public function dump($depth = 3, ?\SplObjectStorage $dumped = null)
* @see IteratorAggregate::getIterator()
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new \ArrayIterator($this->dump(0));
Expand All @@ -210,6 +211,7 @@ public function getIterator()
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->dump();
Expand Down Expand Up @@ -304,6 +306,7 @@ protected function setProperty($property, $value)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function count()
{
return \count($this->properties);
Expand Down
10 changes: 10 additions & 0 deletions src/DataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public function toArray($associative = true, ...$keys)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function count()
{
return \count($this->objects);
Expand Down Expand Up @@ -283,6 +284,7 @@ public function clear()
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function current()
{
return is_scalar($this->current) ? $this->objects[$this->current] : false;
Expand Down Expand Up @@ -354,6 +356,7 @@ public function jsonSerialize()
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->current;
Expand Down Expand Up @@ -397,6 +400,7 @@ public function walk(callable $funcname)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function next()
{
// Get the object offsets.
Expand Down Expand Up @@ -430,6 +434,7 @@ public function next()
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->objects[$offset]);
Expand All @@ -444,6 +449,7 @@ public function offsetExists($offset)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->objects[$offset] ?? null;
Expand All @@ -460,6 +466,7 @@ public function offsetGet($offset)
* @since 1.0
* @throws \InvalidArgumentException if an object is not an instance of DataObject.
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $object)
{
if (!($object instanceof DataObject)) {
Expand Down Expand Up @@ -489,6 +496,7 @@ public function offsetSet($offset, $object)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
if (!isset($this[$offset])) {
Expand Down Expand Up @@ -522,6 +530,7 @@ public function offsetUnset($offset)
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function rewind()
{
// Set the current position to the first object.
Expand All @@ -540,6 +549,7 @@ public function rewind()
*
* @since 1.0
*/
#[\ReturnTypeWillChange]
public function valid()
{
// Check the current position.
Expand Down