Skip to content

Commit 243d76f

Browse files
authored
Merge pull request #3 from magento-gl/AC-8817
Fixed PHP 8.2 deprecation warnings: 'creation of dynamic property'.
2 parents 120ad9e + c196b1a commit 243d76f

31 files changed

+83
-120
lines changed

library/Zend/Pdf.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
8282
* @license http://framework.zend.com/license/new-bsd New BSD License
8383
*/
84-
#[\AllowDynamicProperties]
8584
class Zend_Pdf
8685
{
8786
/**** Class Constants ****/
@@ -207,6 +206,13 @@ class Zend_Pdf
207206
*/
208207
protected $_parser;
209208

209+
/**
210+
* PDF version specified in the file header
211+
*
212+
* @var string
213+
*/
214+
protected $_pdfHeaderVersion;
215+
210216
/**
211217
* List of inheritable attributesfor pages tree
212218
*

library/Zend/Pdf/Action.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,6 @@ public function hasChildren()
407407
#[\ReturnTypeWillChange]
408408
public function count()
409409
{
410-
return count($this->childOutlines);
410+
return count($this->next);
411411
}
412412
}

library/Zend/Pdf/Canvas.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function __construct($width, $height)
7777
*/
7878
protected function _addProcSet($procSetName)
7979
{
80-
$this->_procset[$procSetName] = 1;
80+
$this->_procSet[$procSetName] = 1;
8181
}
8282

8383
/**

library/Zend/Pdf/Canvas/Abstract.php

+7
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ abstract class Zend_Pdf_Canvas_Abstract implements Zend_Pdf_Canvas_Interface
7474
*/
7575
protected $_style = null;
7676

77+
/**
78+
* Page dictionary (refers to an inderect Zend_Pdf_Element_Dictionary object).
79+
*
80+
* @var Zend_Pdf_Element_Reference|Zend_Pdf_Element_Object
81+
*/
82+
protected $_dictionary;
83+
7784

7885
/**
7986
* Counter for the "Save" operations

library/Zend/Pdf/Element.php

+7
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ abstract class Zend_Pdf_Element
4545
*/
4646
private $_parentObject = null;
4747

48+
/**
49+
* Object value
50+
*
51+
* @var string
52+
*/
53+
public $value;
54+
4855
/**
4956
* Return type of the element.
5057
* See ZPdfPDFConst for possible values

library/Zend/Pdf/Element/Boolean.php

-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
*/
3535
class Zend_Pdf_Element_Boolean extends Zend_Pdf_Element
3636
{
37-
/**
38-
* Object value
39-
*
40-
* @var boolean
41-
*/
42-
public $value;
43-
44-
4537
/**
4638
* Object constructor
4739
*

library/Zend/Pdf/Element/Name.php

-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
*/
3535
class Zend_Pdf_Element_Name extends Zend_Pdf_Element
3636
{
37-
/**
38-
* Object value
39-
*
40-
* @var string
41-
*/
42-
public $value;
43-
44-
4537
/**
4638
* Object constructor
4739
*

library/Zend/Pdf/Element/Null.php

-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
*/
3535
class Zend_Pdf_Element_Null extends Zend_Pdf_Element
3636
{
37-
/**
38-
* Object value. Always null.
39-
*
40-
* @var mixed
41-
*/
42-
public $value;
43-
44-
4537
/**
4638
* Object constructor
4739
*/

library/Zend/Pdf/Element/Numeric.php

-8
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
*/
3535
class Zend_Pdf_Element_Numeric extends Zend_Pdf_Element
3636
{
37-
/**
38-
* Object value
39-
*
40-
* @var numeric
41-
*/
42-
public $value;
43-
44-
4537
/**
4638
* Object constructor
4739
*

library/Zend/Pdf/Element/Stream.php

-8
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@
3737
*/
3838
class Zend_Pdf_Element_Stream extends Zend_Pdf_Element
3939
{
40-
/**
41-
* Object value
42-
*
43-
* @var Zend_Memory_Container
44-
*/
45-
public $value;
46-
47-
4840
/**
4941
* Object constructor
5042
*

library/Zend/Pdf/Element/String.php

-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@
3333
*/
3434
class Zend_Pdf_Element_String extends Zend_Pdf_Element
3535
{
36-
/**
37-
* Object value
38-
*
39-
* @var string
40-
*/
41-
public $value;
42-
4336
/**
4437
* Object constructor
4538
*

library/Zend/Pdf/Outline.php

+43
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,49 @@ abstract class Zend_Pdf_Outline implements RecursiveIterator, Countable
4040
*/
4141
protected $_open = false;
4242

43+
/**
44+
* Outline title.
45+
*
46+
* @var string
47+
*/
48+
protected $_title;
49+
50+
/**
51+
* True if outline item is displayed in italic.
52+
* Default value is false.
53+
*
54+
* @var boolean
55+
*/
56+
protected $_italic = false;
57+
58+
/**
59+
* Color to be used for the outline entry’s text.
60+
61+
* It uses the DeviceRGB color space for color representation.
62+
* Null means default value - black ([0.0 0.0 0.0] in RGB representation).
63+
*
64+
* @var Zend_Pdf_Color_Rgb
65+
*/
66+
protected $_color = null;
67+
68+
/**
69+
* True if outline item is displayed in bold.
70+
* Default value is false.
71+
*
72+
* @var boolean
73+
*/
74+
protected $_bold = false;
75+
76+
/**
77+
* Target destination or action.
78+
* String means named destination
79+
*
80+
* Null means no target.
81+
*
82+
* @var Zend_Pdf_Destination|Zend_Pdf_Action
83+
*/
84+
protected $_target = null;
85+
4386
/**
4487
* Array of child outlines (array of Zend_Pdf_Outline objects)
4588
*

library/Zend/Pdf/Outline/Created.php

-44
Original file line numberDiff line numberDiff line change
@@ -43,50 +43,6 @@
4343
*/
4444
class Zend_Pdf_Outline_Created extends Zend_Pdf_Outline
4545
{
46-
/**
47-
* Outline title.
48-
*
49-
* @var string
50-
*/
51-
protected $_title;
52-
53-
/**
54-
* Color to be used for the outline entry’s text.
55-
56-
* It uses the DeviceRGB color space for color representation.
57-
* Null means default value - black ([0.0 0.0 0.0] in RGB representation).
58-
*
59-
* @var Zend_Pdf_Color_Rgb
60-
*/
61-
protected $_color = null;
62-
63-
/**
64-
* True if outline item is displayed in italic.
65-
* Default value is false.
66-
*
67-
* @var boolean
68-
*/
69-
protected $_italic = false;
70-
71-
/**
72-
* True if outline item is displayed in bold.
73-
* Default value is false.
74-
*
75-
* @var boolean
76-
*/
77-
protected $_bold = false;
78-
79-
/**
80-
* Target destination or action.
81-
* String means named destination
82-
*
83-
* Null means no target.
84-
*
85-
* @var Zend_Pdf_Destination|Zend_Pdf_Action
86-
*/
87-
protected $_target = null;
88-
89-
9046
/**
9147
* Get outline title.
9248
*

library/Zend/Pdf/Page.php

-7
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,6 @@ class Zend_Pdf_Page extends Zend_Pdf_Canvas_Abstract
109109

110110

111111

112-
/**
113-
* Page dictionary (refers to an inderect Zend_Pdf_Element_Dictionary object).
114-
*
115-
* @var Zend_Pdf_Element_Reference|Zend_Pdf_Element_Object
116-
*/
117-
protected $_dictionary;
118-
119112
/**
120113
* PDF objects factory.
121114
*

library/Zend/Pdf/Resource/Font/CidFont.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
5555
* @license http://framework.zend.com/license/new-bsd New BSD License
5656
*/
57-
#[\AllowDynamicProperties]
5857
abstract class Zend_Pdf_Resource_Font_CidFont extends Zend_Pdf_Resource_Font
5958
{
6059
/**
@@ -99,7 +98,7 @@ public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)
9998

10099
$this->_isBold = $fontParser->isBold;
101100
$this->_isItalic = $fontParser->isItalic;
102-
$this->_isMonospaced = $fontParser->isMonospaced;
101+
$this->_isMonospace = $fontParser->isMonospaced;
103102

104103
$this->_underlinePosition = $fontParser->underlinePosition;
105104
$this->_underlineThickness = $fontParser->underlineThickness;

library/Zend/Pdf/Resource/Font/Simple/Parsed.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function __construct(Zend_Pdf_FileParser_Font_OpenType $fontParser)
6161

6262
$this->_isBold = $fontParser->isBold;
6363
$this->_isItalic = $fontParser->isItalic;
64-
$this->_isMonospaced = $fontParser->isMonospaced;
64+
$this->_isMonospace = $fontParser->isMonospaced;
6565

6666
$this->_underlinePosition = $fontParser->underlinePosition;
6767
$this->_underlineThickness = $fontParser->underlineThickness;

library/Zend/Pdf/Resource/Font/Simple/Standard/Courier.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function __construct()
9797

9898
$this->_isBold = false;
9999
$this->_isItalic = false;
100-
$this->_isMonospaced = true;
100+
$this->_isMonospace = true;
101101

102102
$this->_underlinePosition = -100;
103103
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/CourierBold.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function __construct()
9898

9999
$this->_isBold = true;
100100
$this->_isItalic = false;
101-
$this->_isMonospaced = true;
101+
$this->_isMonospace = true;
102102

103103
$this->_underlinePosition = -100;
104104
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/CourierBoldOblique.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function __construct()
9999

100100
$this->_isBold = true;
101101
$this->_isItalic = true;
102-
$this->_isMonospaced = true;
102+
$this->_isMonospace = true;
103103

104104
$this->_underlinePosition = -100;
105105
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/CourierOblique.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function __construct()
9999

100100
$this->_isBold = false;
101101
$this->_isItalic = true;
102-
$this->_isMonospaced = true;
102+
$this->_isMonospace = true;
103103

104104
$this->_underlinePosition = -100;
105105
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/Helvetica.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct()
107107

108108
$this->_isBold = false;
109109
$this->_isItalic = false;
110-
$this->_isMonospaced = false;
110+
$this->_isMonospace = false;
111111

112112
$this->_underlinePosition = -100;
113113
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBold.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct()
107107

108108
$this->_isBold = true;
109109
$this->_isItalic = false;
110-
$this->_isMonospaced = false;
110+
$this->_isMonospace = false;
111111

112112
$this->_underlinePosition = -100;
113113
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaBoldOblique.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function __construct()
110110

111111
$this->_isBold = true;
112112
$this->_isItalic = true;
113-
$this->_isMonospaced = false;
113+
$this->_isMonospace = false;
114114

115115
$this->_underlinePosition = -100;
116116
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/HelveticaOblique.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function __construct()
109109

110110
$this->_isBold = false;
111111
$this->_isItalic = true;
112-
$this->_isMonospaced = false;
112+
$this->_isMonospace = false;
113113

114114
$this->_underlinePosition = -100;
115115
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/Symbol.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public function __construct()
227227

228228
$this->_isBold = false;
229229
$this->_isItalic = false;
230-
$this->_isMonospaced = false;
230+
$this->_isMonospace = false;
231231

232232
$this->_underlinePosition = -100;
233233
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/TimesBold.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function __construct()
106106

107107
$this->_isBold = true;
108108
$this->_isItalic = false;
109-
$this->_isMonospaced = false;
109+
$this->_isMonospace = false;
110110

111111
$this->_underlinePosition = -100;
112112
$this->_underlineThickness = 50;

library/Zend/Pdf/Resource/Font/Simple/Standard/TimesBoldItalic.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function __construct()
107107

108108
$this->_isBold = true;
109109
$this->_isItalic = true;
110-
$this->_isMonospaced = false;
110+
$this->_isMonospace = false;
111111

112112
$this->_underlinePosition = -100;
113113
$this->_underlineThickness = 50;

0 commit comments

Comments
 (0)