Skip to content

Commit 53cd757

Browse files
committed
Rector TypedPropertyFromStrictConstructorRector
1 parent 29cddd9 commit 53cd757

File tree

103 files changed

+318
-872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+318
-872
lines changed

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@ class Calculation
7474

7575
/**
7676
* Instance of the spreadsheet this Calculation Engine is using.
77-
*
78-
* @var ?Spreadsheet
7977
*/
80-
private $spreadsheet;
78+
private ?\PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet;
8179

8280
/**
8381
* Calculation cache.
@@ -93,10 +91,7 @@ class Calculation
9391
*/
9492
private $calculationCacheEnabled = true;
9593

96-
/**
97-
* @var BranchPruner
98-
*/
99-
private $branchPruner;
94+
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\BranchPruner $branchPruner;
10095

10196
/**
10297
* @var bool
@@ -127,10 +122,8 @@ class Calculation
127122

128123
/**
129124
* The debug log generated by the calculation engine.
130-
*
131-
* @var Logger
132125
*/
133-
private $debugLog;
126+
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\Logger $debugLog;
134127

135128
/**
136129
* Flag to determine how formula errors should be handled
@@ -155,17 +148,13 @@ class Calculation
155148

156149
/**
157150
* Reference Helper.
158-
*
159-
* @var ReferenceHelper
160151
*/
161-
private static $referenceHelper;
152+
private static \PhpOffice\PhpSpreadsheet\ReferenceHelper $referenceHelper;
162153

163154
/**
164155
* An array of the nested cell references accessed by the calculation engine, used for the debug log.
165-
*
166-
* @var CyclicReferenceStack
167156
*/
168-
private $cyclicReferenceStack;
157+
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack $cyclicReferenceStack;
169158

170159
/** @var array */
171160
private $cellStack = [];

src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
class BranchPruner
88
{
9-
/**
10-
* @var bool
11-
*/
12-
protected $branchPruningEnabled = true;
9+
protected bool $branchPruningEnabled;
1310

1411
/**
1512
* Used to generate unique store keys.

src/PhpSpreadsheet/Calculation/Engine/Logger.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@ class Logger
3232

3333
/**
3434
* The calculation engine cell reference stack.
35-
*
36-
* @var CyclicReferenceStack
3735
*/
38-
private $cellStack;
36+
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack $cellStack;
3937

4038
/**
4139
* Instantiate a Calculation engine logger.

src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ class InterestAndPrincipal
99
/** @var float */
1010
protected $interest;
1111

12-
/** @var float */
13-
protected $principal;
12+
protected float $principal;
1413

1514
public function __construct(
1615
float $rate = 0.0,

src/PhpSpreadsheet/Calculation/FormulaParser.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,8 @@ class FormulaParser
4646

4747
/**
4848
* Formula.
49-
*
50-
* @var string
5149
*/
52-
private $formula;
50+
private string $formula;
5351

5452
/**
5553
* Tokens.

src/PhpSpreadsheet/Calculation/Token/Stack.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
class Stack
99
{
10-
/**
11-
* @var BranchPruner
12-
*/
13-
private $branchPruner;
10+
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\BranchPruner $branchPruner;
1411

1512
/**
1613
* The parser stack for formulae.

src/PhpSpreadsheet/Cell/Cell.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,15 @@ class Cell
4545

4646
/**
4747
* Type of the cell data.
48-
*
49-
* @var string
5048
*/
51-
private $dataType;
49+
private string $dataType;
5250

5351
/**
5452
* The collection of cells that this cell belongs to (i.e. The Cell Collection for the parent Worksheet).
5553
*
5654
* @var ?Cells
5755
*/
58-
private $parent;
56+
private ?Cells $parent;
5957

6058
/**
6159
* Index to the cellXf reference for the styling of this cell.
@@ -71,8 +69,7 @@ class Cell
7169
*/
7270
private $formulaAttributes;
7371

74-
/** @var IgnoredErrors */
75-
private $ignoredErrors;
72+
private IgnoredErrors $ignoredErrors;
7673

7774
/**
7875
* Update the cell into the cell collection.

src/PhpSpreadsheet/Cell/CellAddress.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77

88
class CellAddress
99
{
10-
/**
11-
* @var ?Worksheet
12-
*/
13-
protected $worksheet;
10+
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
1411

1512
/**
1613
* @var string

src/PhpSpreadsheet/Cell/ColumnRange.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
class ColumnRange implements AddressRange
88
{
9-
/**
10-
* @var ?Worksheet
11-
*/
12-
protected $worksheet;
9+
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
1310

1411
/**
1512
* @var int

src/PhpSpreadsheet/Cell/RowRange.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66

77
class RowRange implements AddressRange
88
{
9-
/**
10-
* @var ?Worksheet
11-
*/
12-
protected $worksheet;
9+
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
1310

1411
/**
1512
* @var int

0 commit comments

Comments
 (0)