Skip to content

Commit 2ef0fe6

Browse files
committed
chore(PRO-3016): PHP 8.4 forward compatibility
1 parent 52909df commit 2ef0fe6

22 files changed

Lines changed: 49 additions & 49 deletions

library/ZendPdf/Action/AbstractAction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public function __construct(InternalType\AbstractTypeObject $dictionary, \SplObj
9797
*
9898
* @throws \ZendPdf\Exception\ExceptionInterface
9999
* @param \ZendPdf\InternalType\AbstractTypeObject $dictionary (It's actually Dictionary or Dictionary Object or Reference to a Dictionary Object)
100-
* @param SplObjectStorage $processedActions list of already processed action dictionaries, used to avoid cyclic references
100+
* @param SplObjectStorage|null $processedActions list of already processed action dictionaries, used to avoid cyclic references
101101
* @return \ZendPdf\Action\AbstractAction
102102
* @internal
103103
*/
104-
public static function load(InternalType\AbstractTypeObject $dictionary, \SplObjectStorage $processedActions = null)
104+
public static function load(InternalType\AbstractTypeObject $dictionary, ?\SplObjectStorage $processedActions = null)
105105
{
106106
if ($processedActions === null) {
107107
$processedActions = new \SplObjectStorage();
@@ -196,11 +196,11 @@ public function getResource()
196196
*
197197
* @internal
198198
* @param \ZendPdf\ObjectFactory $factory Object factory for newly created indirect objects
199-
* @param SplObjectStorage $processedActions list of already processed actions
199+
* @param SplObjectStorage|null $processedActions list of already processed actions
200200
* (used to prevent infinity loop caused by cyclic references)
201201
* @return \ZendPdf\InternalType\IndirectObject|\ZendPdf\InternalType\IndirectObjectReference
202202
*/
203-
public function dumpAction(ObjectFactory $factory, \SplObjectStorage $processedActions = null)
203+
public function dumpAction(ObjectFactory $factory, ?\SplObjectStorage $processedActions = null)
204204
{
205205
if ($processedActions === null) {
206206
$processedActions = new \SplObjectStorage();

library/ZendPdf/InternalType/AbstractTypeObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ abstract public function getType();
5050
*
5151
* $factory parameter defines operation context.
5252
*
53-
* @param \ZendPdf\ObjectFactory $factory
53+
* @param \ZendPdf\ObjectFactory|null $factory
5454
* @return string
5555
*/
56-
abstract public function toString(Pdf\ObjectFactory $factory = null);
56+
abstract public function toString(?Pdf\ObjectFactory $factory = null);
5757

5858

5959
const CLONE_MODE_SKIP_PAGES = 1; // Do not follow pages during deep copy process

library/ZendPdf/InternalType/ArrayObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ public function getType()
9393
/**
9494
* Return object as string
9595
*
96-
* @param \ZendPdf\ObjectFactory $factory
96+
* @param \ZendPdf\ObjectFactory|null $factory
9797
* @return string
9898
*/
99-
public function toString(Pdf\ObjectFactory $factory = null)
99+
public function toString(?Pdf\ObjectFactory $factory = null)
100100
{
101101
$outStr = '[';
102102
$lastNL = 0;

library/ZendPdf/InternalType/BinaryStringObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ public static function unescape($inStr)
7575
/**
7676
* Return object as string
7777
*
78-
* @param \ZendPdf\ObjectFactory $factory
78+
* @param \ZendPdf\ObjectFactory|null $factory
7979
* @return string
8080
*/
81-
public function toString(Pdf\ObjectFactory $factory = null)
81+
public function toString(?Pdf\ObjectFactory $factory = null)
8282
{
8383
return '<' . self::escape((string)$this->value) . '>';
8484
}

library/ZendPdf/InternalType/BooleanObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public function getType()
6060
/**
6161
* Return object as string
6262
*
63-
* @param \ZendPdf\ObjectFactory $factory
63+
* @param \ZendPdf\ObjectFactory|null $factory
6464
* @return string
6565
*/
66-
public function toString(Pdf\ObjectFactory $factory = null)
66+
public function toString(?Pdf\ObjectFactory $factory = null)
6767
{
6868
return $this->value ? 'true' : 'false';
6969
}

library/ZendPdf/InternalType/DictionaryObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ public function getType()
122122
/**
123123
* Return object as string
124124
*
125-
* @param \ZendPdf\ObjectFactory $factory
125+
* @param \ZendPdf\ObjectFactory|null $factory
126126
* @return string
127127
*/
128-
public function toString(Pdf\ObjectFactory $factory = null)
128+
public function toString(?Pdf\ObjectFactory $factory = null)
129129
{
130130
$outStr = '<<';
131131
$lastNL = 0;

library/ZendPdf/InternalType/IndirectObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ public function getGenNum()
134134
/**
135135
* Return reference to the object
136136
*
137-
* @param \ZendPdf\ObjectFactory $factory
137+
* @param \ZendPdf\ObjectFactory|null $factory
138138
* @return string
139139
*/
140-
public function toString(Pdf\ObjectFactory $factory = null)
140+
public function toString(?Pdf\ObjectFactory $factory = null)
141141
{
142142
if ($factory === null) {
143143
$shift = 0;

library/ZendPdf/InternalType/IndirectObjectReference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ public function getType()
121121
/**
122122
* Return reference to the object
123123
*
124-
* @param \ZendPdf\ObjectFactory $factory
124+
* @param \ZendPdf\ObjectFactory|null $factory
125125
* @return string
126126
*/
127-
public function toString(Pdf\ObjectFactory $factory = null)
127+
public function toString(?Pdf\ObjectFactory $factory = null)
128128
{
129129
if ($factory === null) {
130130
$shift = 0;

library/ZendPdf/InternalType/NameObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ public static function unescape($inStr)
139139
/**
140140
* Return object as string
141141
*
142-
* @param \ZendPdf\ObjectFactory $factory
142+
* @param \ZendPdf\ObjectFactory|null $factory
143143
* @return string
144144
*/
145-
public function toString(Pdf\ObjectFactory $factory = null)
145+
public function toString(?Pdf\ObjectFactory $factory = null)
146146
{
147147
return '/' . self::escape((string)$this->value);
148148
}

library/ZendPdf/InternalType/NullObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ public function getType()
5252
/**
5353
* Return object as string
5454
*
55-
* @param \ZendPdf\ObjectFactory $factory
55+
* @param \ZendPdf\ObjectFactory|null $factory
5656
* @return string
5757
*/
58-
public function toString(Pdf\ObjectFactory $factory = null)
58+
public function toString(?Pdf\ObjectFactory $factory = null)
5959
{
6060
return 'null';
6161
}

0 commit comments

Comments
 (0)