File tree 5 files changed +17
-1
lines changed
src/Elasticsearch/Helper/Iterators
tests/Elasticsearch/Tests
5 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 48
48
}
49
49
},
50
50
"config" : {
51
- "sort-packages" : true
51
+ "sort-packages" : true ,
52
+ "allow-plugins" : {
53
+ "php-http/discovery" : true
54
+ }
52
55
},
53
56
"scripts" : {
54
57
"phpcs" : [
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public function __construct(SearchResponseIterator $search_responses)
69
69
* @return void
70
70
* @see Iterator::rewind()
71
71
*/
72
+ #[\ReturnTypeWillChange]
72
73
public function rewind ()
73
74
{
74
75
$ this ->current_key = 0 ;
@@ -96,6 +97,7 @@ public function rewind()
96
97
* @return void
97
98
* @see Iterator::next()
98
99
*/
100
+ #[\ReturnTypeWillChange]
99
101
public function next ()
100
102
{
101
103
$ this ->current_key ++;
@@ -115,6 +117,7 @@ public function next()
115
117
* @return bool
116
118
* @see Iterator::valid()
117
119
*/
120
+ #[\ReturnTypeWillChange]
118
121
public function valid ()
119
122
{
120
123
return is_array ($ this ->current_hit_data );
@@ -126,6 +129,7 @@ public function valid()
126
129
* @return array
127
130
* @see Iterator::current()
128
131
*/
132
+ #[\ReturnTypeWillChange]
129
133
public function current ()
130
134
{
131
135
return $ this ->current_hit_data ;
@@ -137,6 +141,7 @@ public function current()
137
141
* @return int
138
142
* @see Iterator::key()
139
143
*/
144
+ #[\ReturnTypeWillChange]
140
145
public function key ()
141
146
{
142
147
return $ this ->current_key ;
@@ -161,6 +166,7 @@ private function readPageData()
161
166
/**
162
167
* {@inheritDoc}
163
168
*/
169
+ #[\ReturnTypeWillChange]
164
170
public function count ()
165
171
{
166
172
if ($ this ->count === null ) {
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ private function clearScroll()
123
123
* @return void
124
124
* @see Iterator::rewind()
125
125
*/
126
+ #[\ReturnTypeWillChange]
126
127
public function rewind ()
127
128
{
128
129
$ this ->clearScroll ();
@@ -137,6 +138,7 @@ public function rewind()
137
138
* @return void
138
139
* @see Iterator::next()
139
140
*/
141
+ #[\ReturnTypeWillChange]
140
142
public function next ()
141
143
{
142
144
$ this ->current_scrolled_response = $ this ->client ->scroll ([
@@ -153,6 +155,7 @@ public function next()
153
155
* @return bool
154
156
* @see Iterator::valid()
155
157
*/
158
+ #[\ReturnTypeWillChange]
156
159
public function valid ()
157
160
{
158
161
return isset ($ this ->current_scrolled_response ['hits ' ]['hits ' ][0 ]);
@@ -164,6 +167,7 @@ public function valid()
164
167
* @return array
165
168
* @see Iterator::current()
166
169
*/
170
+ #[\ReturnTypeWillChange]
167
171
public function current ()
168
172
{
169
173
return $ this ->current_scrolled_response ;
@@ -175,6 +179,7 @@ public function current()
175
179
* @return int
176
180
* @see Iterator::key()
177
181
*/
182
+ #[\ReturnTypeWillChange]
178
183
public function key ()
179
184
{
180
185
return $ this ->current_key ;
Original file line number Diff line number Diff line change 26
26
* Class SearchResponseIteratorTest
27
27
*
28
28
*/
29
+ #[\AllowDynamicProperties]
29
30
class SearchHitIteratorTest extends \PHPUnit \Framework \TestCase
30
31
{
31
32
Original file line number Diff line number Diff line change 29
29
use Psr \Log \LoggerInterface ;
30
30
use React \Promise \Deferred ;
31
31
32
+ #[\AllowDynamicProperties]
32
33
class TransportTest extends TestCase
33
34
{
34
35
public function setUp (): void
You can’t perform that action at this time.
0 commit comments