Skip to content

Commit 1fda83d

Browse files
committed
Remember to re-baseline phpstan before final commit and push because of method name changes
1 parent 08849a7 commit 1fda83d

Some content is hidden

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

47 files changed

+147
-152
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,11 +2580,6 @@ parameters:
25802580
count: 1
25812581
path: src/PhpSpreadsheet/Shared/OLERead.php
25822582

2583-
-
2584-
message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_calculateFormulaValue\\(\\)\\.$#"
2585-
count: 1
2586-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2587-
25882583
-
25892584
message: "#^Static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\TimeZone\\:\\:validateTimeZone\\(\\) is unused\\.$#"
25902585
count: 1

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

src/PhpSpreadsheet/Calculation/Engineering/BitWise.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private static function splitNumber($number): array
4040
* If an array of numbers is passed as an argument, then the returned result will also be an array
4141
* with the same dimensions
4242
*/
43-
public static function BITAND($number1, $number2)
43+
public static function and($number1, $number2)
4444
{
4545
if (is_array($number1) || is_array($number2)) {
4646
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);
@@ -75,7 +75,7 @@ public static function BITAND($number1, $number2)
7575
* If an array of numbers is passed as an argument, then the returned result will also be an array
7676
* with the same dimensions
7777
*/
78-
public static function BITOR($number1, $number2)
78+
public static function or($number1, $number2)
7979
{
8080
if (is_array($number1) || is_array($number2)) {
8181
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);
@@ -111,7 +111,7 @@ public static function BITOR($number1, $number2)
111111
* If an array of numbers is passed as an argument, then the returned result will also be an array
112112
* with the same dimensions
113113
*/
114-
public static function BITXOR($number1, $number2)
114+
public static function xor($number1, $number2)
115115
{
116116
if (is_array($number1) || is_array($number2)) {
117117
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number1, $number2);
@@ -147,7 +147,7 @@ public static function BITXOR($number1, $number2)
147147
* If an array of numbers is passed as an argument, then the returned result will also be an array
148148
* with the same dimensions
149149
*/
150-
public static function BITLSHIFT($number, $shiftAmount)
150+
public static function leftShift($number, $shiftAmount)
151151
{
152152
if (is_array($number) || is_array($shiftAmount)) {
153153
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount);
@@ -185,7 +185,7 @@ public static function BITLSHIFT($number, $shiftAmount)
185185
* If an array of numbers is passed as an argument, then the returned result will also be an array
186186
* with the same dimensions
187187
*/
188-
public static function BITRSHIFT($number, $shiftAmount)
188+
public static function rightShift($number, $shiftAmount)
189189
{
190190
if (is_array($number) || is_array($shiftAmount)) {
191191
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $shiftAmount);

src/PhpSpreadsheet/Calculation/Engineering/Compare.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Compare
2929
* If an array of numbers is passed as an argument, then the returned result will also be an array
3030
* with the same dimensions
3131
*/
32-
public static function DELTA($a, $b = 0.0)
32+
public static function delta($a, $b = 0.0)
3333
{
3434
if (is_array($a) || is_array($b)) {
3535
return self::evaluateArrayArguments([self::class, __FUNCTION__], $a, $b);
@@ -64,7 +64,7 @@ public static function DELTA($a, $b = 0.0)
6464
* If an array of numbers is passed as an argument, then the returned result will also be an array
6565
* with the same dimensions
6666
*/
67-
public static function GESTEP($number, $step = 0.0)
67+
public static function geStep($number, $step = 0.0)
6868
{
6969
if (is_array($number) || is_array($step)) {
7070
return self::evaluateArrayArguments([self::class, __FUNCTION__], $number, $step);

src/PhpSpreadsheet/Calculation/Financial/Dollar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Dollar
3131
*/
3232
public static function format($number, $precision = 2)
3333
{
34-
return Format::DOLLAR($number, $precision);
34+
return Format::dollar($number, $precision);
3535
}
3636

3737
/**

src/PhpSpreadsheet/Calculation/Logical/Conditional.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Conditional
4646
*
4747
* @return mixed The value of returnIfTrue or returnIfFalse determined by condition
4848
*/
49-
public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
49+
public static function if($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
5050
{
5151
$condition = ($condition === null) ? true : Functions::flattenSingleValue($condition);
5252

@@ -86,7 +86,7 @@ public static function statementIf($condition = true, $returnIfTrue = 0, $return
8686
*
8787
* @return mixed The value of matched expression
8888
*/
89-
public static function statementSwitch(...$arguments)
89+
public static function switch(...$arguments)
9090
{
9191
$result = ExcelError::VALUE();
9292

@@ -132,15 +132,15 @@ public static function statementSwitch(...$arguments)
132132
* If an array of values is passed as the $testValue argument, then the returned result will also be
133133
* an array with the same dimensions
134134
*/
135-
public static function IFERROR($testValue = '', $errorpart = '')
135+
public static function ifError($testValue = '', $errorpart = '')
136136
{
137137
if (is_array($testValue)) {
138138
return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $testValue, $errorpart);
139139
}
140140

141141
$errorpart = $errorpart ?? '';
142142

143-
return self::statementIf(ErrorValue::isError($testValue), $errorpart, $testValue);
143+
return self::if(ErrorValue::isError($testValue), $errorpart, $testValue);
144144
}
145145

146146
/**
@@ -158,15 +158,15 @@ public static function IFERROR($testValue = '', $errorpart = '')
158158
* If an array of values is passed as the $testValue argument, then the returned result will also be
159159
* an array with the same dimensions
160160
*/
161-
public static function IFNA($testValue = '', $napart = '')
161+
public static function ifNa($testValue = '', $napart = '')
162162
{
163163
if (is_array($testValue)) {
164164
return self::evaluateArrayArgumentsSubset([self::class, __FUNCTION__], 1, $testValue, $napart);
165165
}
166166

167167
$napart = $napart ?? '';
168168

169-
return self::statementIf(ErrorValue::isNa($testValue), $napart, $testValue);
169+
return self::if(ErrorValue::isNa($testValue), $napart, $testValue);
170170
}
171171

172172
/**
@@ -185,7 +185,7 @@ public static function IFNA($testValue = '', $napart = '')
185185
*
186186
* @return mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true
187187
*/
188-
public static function IFS(...$arguments)
188+
public static function ifSeries(...$arguments)
189189
{
190190
$argumentCount = count($arguments);
191191

@@ -197,7 +197,7 @@ public static function IFS(...$arguments)
197197
for ($i = 0; $i < $argumentCount; $i += 2) {
198198
$testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]);
199199
$returnIfTrue = ($arguments[$i + 1] === null) ? '' : $arguments[$i + 1];
200-
$result = self::statementIf($testValue, $returnIfTrue, $falseValueException);
200+
$result = self::if($testValue, $returnIfTrue, $falseValueException);
201201

202202
if ($result !== $falseValueException) {
203203
return $result;

src/PhpSpreadsheet/Calculation/Logical/Operations.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Operations
3131
*
3232
* @return bool|string the logical AND of the arguments
3333
*/
34-
public static function logicalAnd(...$args)
34+
public static function and(...$args)
3535
{
3636
$args = Functions::flattenArray($args);
3737

@@ -72,7 +72,7 @@ public static function logicalAnd(...$args)
7272
*
7373
* @return bool|string the logical OR of the arguments
7474
*/
75-
public static function logicalOr(...$args)
75+
public static function or(...$args)
7676
{
7777
$args = Functions::flattenArray($args);
7878

@@ -114,7 +114,7 @@ public static function logicalOr(...$args)
114114
*
115115
* @return bool|string the logical XOR of the arguments
116116
*/
117-
public static function logicalXor(...$args)
117+
public static function xor(...$args)
118118
{
119119
$args = Functions::flattenArray($args);
120120

@@ -156,7 +156,7 @@ public static function logicalXor(...$args)
156156
* If an array of values is passed as an argument, then the returned result will also be an array
157157
* with the same dimensions
158158
*/
159-
public static function NOT($logical = false)
159+
public static function not($logical = false)
160160
{
161161
if (is_array($logical)) {
162162
return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $logical);

src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ExcelMatch
3232
*
3333
* @return array|int|string The relative position of the found item
3434
*/
35-
public static function MATCH($lookupValue, $lookupArray, $matchType = self::MATCHTYPE_LARGEST_VALUE)
35+
public static function match($lookupValue, $lookupArray, $matchType = self::MATCHTYPE_LARGEST_VALUE)
3636
{
3737
if (is_array($lookupValue)) {
3838
return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $matchType);

src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private static function validateAddress($cellAddress): string
6161
*
6262
* @return array|string An array containing a cell or range of cells, or a string on error
6363
*/
64-
public static function INDIRECT($cellAddress, $a1fmt, Cell $cell)
64+
public static function indirect($cellAddress, $a1fmt, Cell $cell)
6565
{
6666
try {
6767
$a1 = self::a1Format($a1fmt);

src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static function cellColumn(?Cell $cell): int
4242
*
4343
* @return int|int[]
4444
*/
45-
public static function COLUMN($cellAddress = null, ?Cell $cell = null)
45+
public static function column($cellAddress = null, ?Cell $cell = null)
4646
{
4747
if (self::cellAddressNullOrWhitespace($cellAddress)) {
4848
return self::cellColumn($cell);
@@ -93,7 +93,7 @@ public static function COLUMN($cellAddress = null, ?Cell $cell = null)
9393
*
9494
* @return int|string The number of columns in cellAddress, or a string if arguments are invalid
9595
*/
96-
public static function COLUMNS($cellAddress = null)
96+
public static function columns($cellAddress = null)
9797
{
9898
if (self::cellAddressNullOrWhitespace($cellAddress)) {
9999
return 1;
@@ -135,7 +135,7 @@ private static function cellRow(?Cell $cell): int
135135
*
136136
* @return int|mixed[]|string
137137
*/
138-
public static function ROW($cellAddress = null, ?Cell $cell = null)
138+
public static function row($cellAddress = null, ?Cell $cell = null)
139139
{
140140
if (self::cellAddressNullOrWhitespace($cellAddress)) {
141141
return self::cellRow($cell);
@@ -187,7 +187,7 @@ function ($value) {
187187
*
188188
* @return int|string The number of rows in cellAddress, or a string if arguments are invalid
189189
*/
190-
public static function ROWS($cellAddress = null)
190+
public static function rows($cellAddress = null)
191191
{
192192
if (self::cellAddressNullOrWhitespace($cellAddress)) {
193193
return 1;

0 commit comments

Comments
 (0)