Skip to content

Commit b36bd44

Browse files
committed
Revert "[3.x] Fix unignorable phpstan errors (#28)"
This reverts commit 99f72e0.
1 parent 99f72e0 commit b36bd44

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/DataObject.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,19 @@ public function dump($depth = 3, ?\SplObjectStorage $dumped = null)
198198
* @see IteratorAggregate::getIterator()
199199
* @since 1.0
200200
*/
201-
public function getIterator(): \ArrayIterator
201+
public function getIterator()
202202
{
203203
return new \ArrayIterator($this->dump(0));
204204
}
205205

206206
/**
207207
* Gets the data properties in a form that can be serialised to JSON format.
208208
*
209-
* @return \stdClass
209+
* @return mixed
210210
*
211211
* @since 1.0
212212
*/
213-
public function jsonSerialize(): \stdClass
213+
public function jsonSerialize()
214214
{
215215
return $this->dump();
216216
}
@@ -304,7 +304,7 @@ protected function setProperty($property, $value)
304304
*
305305
* @since 1.0
306306
*/
307-
public function count(): int
307+
public function count()
308308
{
309309
return \count($this->properties);
310310
}

src/DataSet.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public function toArray($associative = true, ...$keys)
256256
*
257257
* @since 1.0
258258
*/
259-
public function count(): int
259+
public function count()
260260
{
261261
return \count($this->objects);
262262
}
@@ -268,7 +268,7 @@ public function count(): int
268268
*
269269
* @since 1.0
270270
*/
271-
public function clear(): DataSet
271+
public function clear()
272272
{
273273
$this->objects = [];
274274
$this->rewind();
@@ -279,11 +279,11 @@ public function clear(): DataSet
279279
/**
280280
* Get the current data object in the set.
281281
*
282-
* @return DataObject|bool The current object, or false if the array is empty or the pointer is beyond the end of the elements.
282+
* @return DataObject|false The current object, or false if the array is empty or the pointer is beyond the end of the elements.
283283
*
284284
* @since 1.0
285285
*/
286-
public function current(): DataObject|bool
286+
public function current()
287287
{
288288
return is_scalar($this->current) ? $this->objects[$this->current] : false;
289289
}
@@ -350,11 +350,11 @@ public function jsonSerialize()
350350
/**
351351
* Gets the key of the current object in the iterator.
352352
*
353-
* @return int|bool|null The object key on success; false on failure.
353+
* @return integer|false The object key on success; false on failure.
354354
*
355355
* @since 1.0
356356
*/
357-
public function key(): int|bool|null
357+
public function key()
358358
{
359359
return $this->current;
360360
}
@@ -397,7 +397,7 @@ public function walk(callable $funcname)
397397
*
398398
* @since 1.0
399399
*/
400-
public function next(): void
400+
public function next()
401401
{
402402
// Get the object offsets.
403403
$keys = $this->keys();
@@ -430,7 +430,7 @@ public function next(): void
430430
*
431431
* @since 1.0
432432
*/
433-
public function offsetExists($offset): bool
433+
public function offsetExists($offset)
434434
{
435435
return isset($this->objects[$offset]);
436436
}
@@ -444,7 +444,7 @@ public function offsetExists($offset): bool
444444
*
445445
* @since 1.0
446446
*/
447-
public function offsetGet($offset): DataObject|null
447+
public function offsetGet($offset)
448448
{
449449
return $this->objects[$offset] ?? null;
450450
}
@@ -460,7 +460,7 @@ public function offsetGet($offset): DataObject|null
460460
* @since 1.0
461461
* @throws \InvalidArgumentException if an object is not an instance of DataObject.
462462
*/
463-
public function offsetSet($offset, $object): void
463+
public function offsetSet($offset, $object)
464464
{
465465
if (!($object instanceof DataObject)) {
466466
throw new \InvalidArgumentException(
@@ -489,7 +489,7 @@ public function offsetSet($offset, $object): void
489489
*
490490
* @since 1.0
491491
*/
492-
public function offsetUnset($offset): void
492+
public function offsetUnset($offset)
493493
{
494494
if (!isset($this[$offset])) {
495495
// Do nothing if the offset does not exist.
@@ -522,7 +522,7 @@ public function offsetUnset($offset): void
522522
*
523523
* @since 1.0
524524
*/
525-
public function rewind(): void
525+
public function rewind()
526526
{
527527
// Set the current position to the first object.
528528
if (empty($this->objects)) {
@@ -540,7 +540,7 @@ public function rewind(): void
540540
*
541541
* @since 1.0
542542
*/
543-
public function valid(): bool
543+
public function valid()
544544
{
545545
// Check the current position.
546546
if (!is_scalar($this->current) || !isset($this->objects[$this->current])) {

0 commit comments

Comments
 (0)