Skip to content

Commit 47845b1

Browse files
committed
Update README for PHP 8 compatibility fork
Added a disclaimer about the forked repository and updated the installation command to reflect the new package name compatible with PHP 8. This ensures clarity for users on the origin and purpose of the changes.
1 parent cd4346a commit 47845b1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Jlinn/Mandrill/Struct.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace Jlinn\Mandrill;
99

10+
use ArrayIterator;
11+
use Traversable;
12+
1013
abstract class Struct implements \IteratorAggregate{
1114
/**
1215
* Create a Struct from an associative array
@@ -44,11 +47,12 @@ public function toArray(){
4447
* (PHP 5 &gt;= 5.0.0)<br/>
4548
* Retrieve an external iterator
4649
* @link http://php.net/manual/en/iteratoraggregate.getiterator.php
47-
* @return \Traversable An instance of an object implementing <b>Iterator</b> or
50+
* @return Traversable|ArrayIterator An instance of an object implementing <b>Iterator</b> or
4851
* <b>Traversable</b>
4952
*/
50-
public function getIterator(){
51-
return new \ArrayIterator($this->toArray());
53+
public function getIterator(): \Traversable|\ArrayIterator
54+
{
55+
return new ArrayIterator($this->toArray());
5256
}
5357

5458

0 commit comments

Comments
 (0)