Skip to content

Commit f11a65d

Browse files
committed
AC-2892: fix return types in Zend_Pdf
1 parent 7f6bbfd commit f11a65d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

library/Zend/Pdf/Action.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ public function dumpAction(Zend_Pdf_ElementFactory_Interface $factory, SplObject
326326
*
327327
* @return Zend_Pdf_Action
328328
*/
329+
#[\ReturnTypeWillChange]
329330
public function current()
330331
{
331332
return current($this->next);
@@ -336,6 +337,7 @@ public function current()
336337
*
337338
* @return integer
338339
*/
340+
#[\ReturnTypeWillChange]
339341
public function key()
340342
{
341343
return key($this->next);
@@ -344,6 +346,7 @@ public function key()
344346
/**
345347
* Go to next child
346348
*/
349+
#[\ReturnTypeWillChange]
347350
public function next()
348351
{
349352
return next($this->next);
@@ -352,6 +355,7 @@ public function next()
352355
/**
353356
* Rewind children
354357
*/
358+
#[\ReturnTypeWillChange]
355359
public function rewind()
356360
{
357361
return reset($this->next);
@@ -362,6 +366,7 @@ public function rewind()
362366
*
363367
* @return boolean
364368
*/
369+
#[\ReturnTypeWillChange]
365370
public function valid()
366371
{
367372
return current($this->next) !== false;
@@ -372,6 +377,7 @@ public function valid()
372377
*
373378
* @return Zend_Pdf_Action|null
374379
*/
380+
#[\ReturnTypeWillChange]
375381
public function getChildren()
376382
{
377383
return current($this->next);
@@ -382,6 +388,7 @@ public function getChildren()
382388
*
383389
* @return bool whether container has any pages
384390
*/
391+
#[\ReturnTypeWillChange]
385392
public function hasChildren()
386393
{
387394
return count($this->next) > 0;
@@ -397,6 +404,7 @@ public function hasChildren()
397404
*
398405
* @return int
399406
*/
407+
#[\ReturnTypeWillChange]
400408
public function count()
401409
{
402410
return count($this->childOutlines);

library/Zend/Pdf/Outline.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ abstract public function dumpOutline(Zend_Pdf_ElementFactory_Interface $factory,
295295
*
296296
* @return Zend_Pdf_Outline
297297
*/
298+
#[\ReturnTypeWillChange]
298299
public function current()
299300
{
300301
return current($this->childOutlines);
@@ -305,6 +306,7 @@ public function current()
305306
*
306307
* @return integer
307308
*/
309+
#[\ReturnTypeWillChange]
308310
public function key()
309311
{
310312
return key($this->childOutlines);
@@ -313,6 +315,7 @@ public function key()
313315
/**
314316
* Go to next child
315317
*/
318+
#[\ReturnTypeWillChange]
316319
public function next()
317320
{
318321
return next($this->childOutlines);
@@ -321,6 +324,7 @@ public function next()
321324
/**
322325
* Rewind children
323326
*/
327+
#[\ReturnTypeWillChange]
324328
public function rewind()
325329
{
326330
return reset($this->childOutlines);
@@ -331,6 +335,7 @@ public function rewind()
331335
*
332336
* @return boolean
333337
*/
338+
#[\ReturnTypeWillChange]
334339
public function valid()
335340
{
336341
return current($this->childOutlines) !== false;
@@ -341,6 +346,7 @@ public function valid()
341346
*
342347
* @return Zend_Pdf_Outline|null
343348
*/
349+
#[\ReturnTypeWillChange]
344350
public function getChildren()
345351
{
346352
return current($this->childOutlines);
@@ -351,6 +357,7 @@ public function getChildren()
351357
*
352358
* @return bool whether container has any pages
353359
*/
360+
#[\ReturnTypeWillChange]
354361
public function hasChildren()
355362
{
356363
return count($this->childOutlines) > 0;
@@ -366,6 +373,7 @@ public function hasChildren()
366373
*
367374
* @return int
368375
*/
376+
#[\ReturnTypeWillChange]
369377
public function count()
370378
{
371379
return count($this->childOutlines);

0 commit comments

Comments
 (0)