← All changes
|
libraries/vendor/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+3
-3
3.3.2
→
3.4
View file →
| @@ -23,9 +23,9 @@ | ||
| 23 | 23 | * You can use any range for the criteria argument, as long as it |
| 24 | 24 | * includes at least one column label and at least one cell below |
| 25 | 25 | * the column label in which you specify a condition for the |
| 26 | 26 | * column. |
| 27 | - * @return float|int|string|null | |
| 27 | + * @return null|float|int|string | |
| 28 | 28 | */ |
| 29 | 29 | abstract public static function evaluate(array $database, $field, array $criteria); |
| 30 | 30 | |
| 31 | 31 | /** |
| @@ -53,9 +53,9 @@ | ||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** @var callable */ |
| 56 | 56 | $callable = 'strtoupper'; |
| 57 | - $fieldNames = array_map($callable, array_shift($database)); //* @phpstan-ignore-line | |
| 57 | + $fieldNames = array_map($callable, array_shift($database)); //* @phpstan-ignore argument.type (array_shift can return mixed not array?) | |
| 58 | 58 | if (is_numeric($field)) { |
| 59 | 59 | $field = (int) $field - 1; |
| 60 | 60 | if ($field < 0 || $field >= count($fieldNames)) { |
| 61 | 61 | return null; |
| @@ -143,9 +143,9 @@ | ||
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $rowQuery = array_map( |
| 147 | - fn ($rowValue): string => (count($rowValue) > 1) ? 'AND(' . implode(',', $rowValue) . ')' : ($rowValue[0] ?? ''), // @phpstan-ignore-line | |
| 147 | + fn ($rowValue): string => (count($rowValue) > 1) ? 'AND(' . implode(',', $rowValue) . ')' : ($rowValue[0] ?? ''), // @phpstan-ignore nullCoalesce.offset ($rowValue[0] always exists?) | |
| 148 | 148 | $baseQuery |
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | 151 | return (count($rowQuery) > 1) ? 'OR(' . implode(',', $rowQuery) . ')' : ($rowQuery[0] ?? ''); |