File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed
src/GetStream/StreamLaravel Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change 11<?php namespace GetStream \StreamLaravel ;
22
3- class EnrichedActivity implements \ArrayAccess, \Iterator {
3+ class EnrichedActivity implements \ArrayAccess, \IteratorAggregate {
44 private $ activityData = array ();
55 private $ notEnrichedData = array ();
66
@@ -49,30 +49,9 @@ public function offsetGet($offset)
4949 return isset ($ this ->activityData [$ offset ]) ? $ this ->activityData [$ offset ] : null ;
5050 }
5151
52- // Array iteration methods
53- public function rewind ()
54- {
55- reset ($ this ->activityData );
56- }
57-
58- public function current ()
59- {
60- return current ($ this ->activityData );
61- }
62-
63- public function key ()
64- {
65- return key ($ this ->activityData );
66- }
67-
68- public function next ()
69- {
70- return next ($ this ->activityData );
71- }
72-
73- public function valid ()
74- {
75- return (bool ) $ this ->current ();
52+ // Support iteration over private activityData array
53+ public function getIterator () {
54+ return new \ArrayIterator ($ this ->activityData );
7655 }
7756
7857}
You can’t perform that action at this time.
0 commit comments