Skip to content

Commit af19547

Browse files
authored
Add @return phpdoc to ReturnTypeWillChange methods (#846)
1 parent c10ea7f commit af19547

File tree

4 files changed

+63
-1
lines changed

4 files changed

+63
-1
lines changed

src/Gd/Layers.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ public function animate($format, $delay, $loops)
106106
* {@inheritdoc}
107107
*
108108
* @see \Iterator::current()
109+
*
110+
* @return mixed
109111
*/
110112
#[\ReturnTypeWillChange]
111113
public function current()
@@ -117,6 +119,8 @@ public function current()
117119
* {@inheritdoc}
118120
*
119121
* @see \Iterator::key()
122+
*
123+
* @return mixed
120124
*/
121125
#[\ReturnTypeWillChange]
122126
public function key()
@@ -128,6 +132,8 @@ public function key()
128132
* {@inheritdoc}
129133
*
130134
* @see \Iterator::next()
135+
*
136+
* @return mixed
131137
*/
132138
#[\ReturnTypeWillChange]
133139
public function next()
@@ -139,6 +145,8 @@ public function next()
139145
* {@inheritdoc}
140146
*
141147
* @see \Iterator::rewind()
148+
*
149+
* @return void
142150
*/
143151
#[\ReturnTypeWillChange]
144152
public function rewind()
@@ -150,6 +158,8 @@ public function rewind()
150158
* {@inheritdoc}
151159
*
152160
* @see \Iterator::valid()
161+
*
162+
* @return bool
153163
*/
154164
#[\ReturnTypeWillChange]
155165
public function valid()
@@ -161,6 +171,8 @@ public function valid()
161171
* {@inheritdoc}
162172
*
163173
* @see \Countable::count()
174+
*
175+
* @return int
164176
*/
165177
#[\ReturnTypeWillChange]
166178
public function count()
@@ -172,6 +184,8 @@ public function count()
172184
* {@inheritdoc}
173185
*
174186
* @see \ArrayAccess::offsetExists()
187+
*
188+
* @return bool
175189
*/
176190
#[\ReturnTypeWillChange]
177191
public function offsetExists($offset)
@@ -183,6 +197,8 @@ public function offsetExists($offset)
183197
* {@inheritdoc}
184198
*
185199
* @see \ArrayAccess::offsetGet()
200+
*
201+
* @return mixed
186202
*/
187203
#[\ReturnTypeWillChange]
188204
public function offsetGet($offset)
@@ -198,6 +214,8 @@ public function offsetGet($offset)
198214
* {@inheritdoc}
199215
*
200216
* @see \ArrayAccess::offsetSet()
217+
*
218+
* @return void
201219
*/
202220
#[\ReturnTypeWillChange]
203221
public function offsetSet($offset, $value)
@@ -209,6 +227,8 @@ public function offsetSet($offset, $value)
209227
* {@inheritdoc}
210228
*
211229
* @see \ArrayAccess::offsetUnset()
230+
*
231+
* @return void
212232
*/
213233
#[\ReturnTypeWillChange]
214234
public function offsetUnset($offset)

src/Gmagick/Layers.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public function animate($format, $delay, $loops)
142142
* {@inheritdoc}
143143
*
144144
* @see \Iterator::current()
145+
*
146+
* @return mixed
145147
*/
146148
#[\ReturnTypeWillChange]
147149
public function current()
@@ -176,6 +178,8 @@ private function extractAt($offset)
176178
* {@inheritdoc}
177179
*
178180
* @see \Iterator::key()
181+
*
182+
* @return mixed
179183
*/
180184
#[\ReturnTypeWillChange]
181185
public function key()
@@ -187,6 +191,8 @@ public function key()
187191
* {@inheritdoc}
188192
*
189193
* @see \Iterator::next()
194+
*
195+
* @return mixed
190196
*/
191197
#[\ReturnTypeWillChange]
192198
public function next()
@@ -198,6 +204,8 @@ public function next()
198204
* {@inheritdoc}
199205
*
200206
* @see \Iterator::rewind()
207+
*
208+
* @return void
201209
*/
202210
#[\ReturnTypeWillChange]
203211
public function rewind()
@@ -209,6 +217,8 @@ public function rewind()
209217
* {@inheritdoc}
210218
*
211219
* @see \Iterator::valid()
220+
*
221+
* @return bool
212222
*/
213223
#[\ReturnTypeWillChange]
214224
public function valid()
@@ -220,6 +230,8 @@ public function valid()
220230
* {@inheritdoc}
221231
*
222232
* @see \Countable::count()
233+
*
234+
* @return int
223235
*/
224236
#[\ReturnTypeWillChange]
225237
public function count()
@@ -235,6 +247,8 @@ public function count()
235247
* {@inheritdoc}
236248
*
237249
* @see \ArrayAccess::offsetExists()
250+
*
251+
* @return bool
238252
*/
239253
#[\ReturnTypeWillChange]
240254
public function offsetExists($offset)
@@ -246,6 +260,8 @@ public function offsetExists($offset)
246260
* {@inheritdoc}
247261
*
248262
* @see \ArrayAccess::offsetGet()
263+
*
264+
* @return mixed
249265
*/
250266
#[\ReturnTypeWillChange]
251267
public function offsetGet($offset)
@@ -257,6 +273,8 @@ public function offsetGet($offset)
257273
* {@inheritdoc}
258274
*
259275
* @see \ArrayAccess::offsetSet()
276+
*
277+
* @return void
260278
*/
261279
#[\ReturnTypeWillChange]
262280
public function offsetSet($offset, $image)
@@ -309,6 +327,8 @@ public function offsetSet($offset, $image)
309327
* {@inheritdoc}
310328
*
311329
* @see \ArrayAccess::offsetUnset()
330+
*
331+
* @return void
312332
*/
313333
#[\ReturnTypeWillChange]
314334
public function offsetUnset($offset)

src/Image/Histogram/Bucket.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public function add($value)
5151
}
5252

5353
/**
54-
* @return int the number of elements in the bucket
54+
* Get the number of elements in the bucket.
55+
*
56+
* @return int
5557
*/
5658
#[\ReturnTypeWillChange]
5759
public function count()

src/Imagick/Layers.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ public function coalesce()
154154
* {@inheritdoc}
155155
*
156156
* @see \Iterator::current()
157+
*
158+
* @return mixed
157159
*/
158160
#[\ReturnTypeWillChange]
159161
public function current()
@@ -188,6 +190,8 @@ private function extractAt($offset)
188190
* {@inheritdoc}
189191
*
190192
* @see \Iterator::key()
193+
*
194+
* @return mixed
191195
*/
192196
#[\ReturnTypeWillChange]
193197
public function key()
@@ -199,6 +203,8 @@ public function key()
199203
* {@inheritdoc}
200204
*
201205
* @see \Iterator::next()
206+
*
207+
* @return mixed
202208
*/
203209
#[\ReturnTypeWillChange]
204210
public function next()
@@ -210,6 +216,8 @@ public function next()
210216
* {@inheritdoc}
211217
*
212218
* @see \Iterator::rewind()
219+
*
220+
* @return void
213221
*/
214222
#[\ReturnTypeWillChange]
215223
public function rewind()
@@ -221,6 +229,8 @@ public function rewind()
221229
* {@inheritdoc}
222230
*
223231
* @see \Iterator::valid()
232+
*
233+
* @return bool
224234
*/
225235
#[\ReturnTypeWillChange]
226236
public function valid()
@@ -232,6 +242,8 @@ public function valid()
232242
* {@inheritdoc}
233243
*
234244
* @see \Countable::count()
245+
*
246+
* @return int
235247
*/
236248
#[\ReturnTypeWillChange]
237249
public function count()
@@ -247,6 +259,8 @@ public function count()
247259
* {@inheritdoc}
248260
*
249261
* @see \ArrayAccess::offsetExists()
262+
*
263+
* @return bool
250264
*/
251265
#[\ReturnTypeWillChange]
252266
public function offsetExists($offset)
@@ -258,6 +272,8 @@ public function offsetExists($offset)
258272
* {@inheritdoc}
259273
*
260274
* @see \ArrayAccess::offsetGet()
275+
*
276+
* @return mixed
261277
*/
262278
#[\ReturnTypeWillChange]
263279
public function offsetGet($offset)
@@ -269,6 +285,8 @@ public function offsetGet($offset)
269285
* {@inheritdoc}
270286
*
271287
* @see \ArrayAccess::offsetSet()
288+
*
289+
* @return void
272290
*/
273291
#[\ReturnTypeWillChange]
274292
public function offsetSet($offset, $image)
@@ -312,6 +330,8 @@ public function offsetSet($offset, $image)
312330
* {@inheritdoc}
313331
*
314332
* @see \ArrayAccess::offsetUnset()
333+
*
334+
* @return void
315335
*/
316336
#[\ReturnTypeWillChange]
317337
public function offsetUnset($offset)

0 commit comments

Comments
 (0)