@@ -185,7 +185,7 @@ private function getDomFromPath(string $path): \DOMDocument
185
185
* Excel can either use a base date from year 1900 (Microsoft Windows) or from year 1904 (old Apple MacOS).
186
186
* https://support.microsoft.com/en-us/office/date-systems-in-excel-e7fe7167-48a9-4b96-bb53-5612a800b487
187
187
* @phpstan-return 1900|1904
188
- * @return int 1900 or 1904
188
+ * @return int ` 1900` or ` 1904`
189
189
* @throws XlsxFastEditorFileFormatException
190
190
* @throws XlsxFastEditorXmlException
191
191
*/
@@ -271,7 +271,7 @@ public function getWorksheetCount(): int
271
271
/**
272
272
* Get a worksheet number (ID) from its name (base 1).
273
273
* @param string $sheetName The name of the worksheet to look up.
274
- * @return int The worksheet ID, or -1 if not found.
274
+ * @return int The worksheet ID, or `-1` if not found.
275
275
* @throws XlsxFastEditorFileFormatException
276
276
* @throws XlsxFastEditorXmlException
277
277
*/
@@ -288,7 +288,7 @@ public function getWorksheetNumber(string $sheetName): int
288
288
/**
289
289
* Get a worksheet name from its number (ID).
290
290
* @param int $sheetNumber The number of the worksheet to look up.
291
- * @return string|null The worksheet name, or null if not found.
291
+ * @return string|null The worksheet name, or ` null` if not found.
292
292
* @throws XlsxFastEditorFileFormatException
293
293
* @throws XlsxFastEditorXmlException
294
294
*/
@@ -452,7 +452,7 @@ public function getLastRow(int $sheetNumber): ?XlsxFastEditorRow
452
452
/**
453
453
* Delete the specified row of the specified worksheet.
454
454
* @param int $sheetNumber Worksheet number (base 1)
455
- * @return bool True if the deletion succeeds, false otherwise.
455
+ * @return bool `true` if the deletion succeeds, ` false` otherwise.
456
456
* @throws XlsxFastEditorFileFormatException
457
457
* @throws XlsxFastEditorXmlException
458
458
*/
@@ -492,7 +492,7 @@ public function rowsIterator(int $sheetNumber): \Traversable
492
492
}
493
493
494
494
/**
495
- * Produce an array from a worksheet, indexed by column name (like `AB `) first, then line (like `12`).
495
+ * Produce an array from a worksheet, indexed by column name (like `'AB' `) first, then line (like `12`).
496
496
* Only the existing lines and cells are included.
497
497
* @return array<string,array<int,null|string>> An array that can be accessed like `$array['AB'][12]`
498
498
* @throws XlsxFastEditorFileFormatException
@@ -510,7 +510,7 @@ public function readArray(int $sheetNumber): array
510
510
}
511
511
512
512
/**
513
- * Produce an array from a worksheet, indexed by column header (like `columnName`) first, then line (like `12`),
513
+ * Produce an array from a worksheet, indexed by column header (like `' columnName' `) first, then line (like `12`),
514
514
* having the column header defined in the first existing line of the spreadsheet.
515
515
* Only the existing lines and cells are included.
516
516
* @return array<string,array<int,null|string>> An array that can be accessed like `$array['columnName'][12]`
@@ -539,10 +539,10 @@ public function readArrayWithHeaders(int $sheetNumber): array
539
539
}
540
540
541
541
/**
542
- * Sort cells (such as `B3 `, `AA23`) on column first (such as `B `, `AA `) and then line (such as `3`, `23`).
543
- * @param $ref1 A cell reference such as `B3 `
544
- * @param $ref1 A cell reference such as `AA23`
545
- * @return int -1 if $ref1 is before $ref2; 1 if $ref1 is greater than $ref2, and 0 if they are equal.
542
+ * Sort cells (such as `'B3' `, `' AA23' `) on column first (such as `'B' `, `'AA' `) and then line (such as `3`, `23`).
543
+ * @param $ref1 A cell reference such as `'B3' `
544
+ * @param $ref1 A cell reference such as `' AA23' `
545
+ * @return int `<0` if $ref1 is before $ref2; `>0` if $ref1 is greater than $ref2, and `0` if they are equal.
546
546
*/
547
547
public static function cellOrderCompare (string $ ref1 , string $ ref2 ): int
548
548
{
@@ -581,7 +581,7 @@ public static function cellOrderCompare(string $ref1, string $ref2): int
581
581
* `XlsxFastEditorRow::getNextRow()`, `XlsxFastEditorRow::getFirstCell()`, `XlsxFastEditorCell::getNextCell()`, etc.
582
582
*
583
583
* @param int $sheetNumber Worksheet number (base 1)
584
- * @param string $cellName Cell name such as `B4 `
584
+ * @param string $cellName Cell name such as `'B4' `
585
585
* @param int $accessMode To control the behaviour when the cell does not exist:
586
586
* set to `XlsxFastEditor::ACCESS_MODE_NULL` to return `null` (default),
587
587
* set to `XlsxFastEditor::ACCESS_MODE_EXCEPTION` to raise an `XlsxFastEditorInputException` exception,
@@ -634,14 +634,14 @@ public function getCell(int $sheetNumber, string $cellName, int $accessMode = Xl
634
634
}
635
635
636
636
/**
637
- * Access the specified cell in the specified worksheet, or null if if does not exist.
637
+ * Access the specified cell in the specified worksheet, or ` null` if if does not exist.
638
638
*
639
639
* ℹ️ Instead of calling multiple times this function, consider the faster navigation methods
640
640
* `XlsxFastEditor::rowsIterator()`, `XlsxFastEditor::getFirstRow()`, `XlsxFastEditorRow::cellsIterator()`,
641
641
* `XlsxFastEditorRow::getNextRow()`, `XlsxFastEditorRow::getFirstCell()`, `XlsxFastEditorCell::getNextCell()`, etc.
642
642
*
643
643
* @param int $sheetNumber Worksheet number (base 1)
644
- * @param string $cellName Cell name such as `B4 `
644
+ * @param string $cellName Cell name such as `'B4' `
645
645
* @return XlsxFastEditorCell|null A cell, potentially `null` if the cell does not exist
646
646
* @throws \InvalidArgumentException if `$cellName` has an invalid format
647
647
* @throws XlsxFastEditorFileFormatException
@@ -661,7 +661,7 @@ public function getCellOrNull(int $sheetNumber, string $cellName): ?XlsxFastEdit
661
661
* Access the specified cell in the specified worksheet, or autocreate it if it does not already exist.
662
662
* The corresponding row can also be automatically created if it does not exist already, but the worksheet cannot be automatically created.
663
663
* @param int $sheetNumber Worksheet number (base 1)
664
- * @param string $cellName Cell name such as `B4 `
664
+ * @param string $cellName Cell name such as `'B4' `
665
665
* @return XlsxFastEditorCell A cell
666
666
* @throws \InvalidArgumentException if `$cellName` has an invalid format
667
667
* @throws XlsxFastEditorFileFormatException
@@ -681,7 +681,7 @@ public function getCellAutocreate(int $sheetNumber, string $cellName): XlsxFastE
681
681
* Read a formula in the given worksheet at the given cell location.
682
682
*
683
683
* @param int $sheetNumber Worksheet number (base 1)
684
- * @param string $cellName Cell name such as `B4 `
684
+ * @param string $cellName Cell name such as `'B4' `
685
685
* @return string|null an integer if the cell exists and contains a formula, `null` otherwise.
686
686
* @throws \InvalidArgumentException if `$cellName` has an invalid format
687
687
* @throws XlsxFastEditorFileFormatException
@@ -697,7 +697,7 @@ public function readFormula(int $sheetNumber, string $cellName): ?string
697
697
* Read a float in the given worksheet at the given cell location.
698
698
*
699
699
* @param int $sheetNumber Worksheet number (base 1)
700
- * @param string $cellName Cell name such as `B4 `
700
+ * @param string $cellName Cell name such as `'B4' `
701
701
* @return float|null a float if the cell exists and contains a number, `null` otherwise.
702
702
* @throws \InvalidArgumentException if `$cellName` has an invalid format
703
703
* @throws XlsxFastEditorFileFormatException
@@ -713,7 +713,7 @@ public function readFloat(int $sheetNumber, string $cellName): ?float
713
713
* Read a date/time in the given worksheet at the given cell location.
714
714
*
715
715
* @param int $sheetNumber Worksheet number (base 1)
716
- * @param string $cellName Cell name such as `B4 `
716
+ * @param string $cellName Cell name such as `'B4' `
717
717
* @return \DateTimeImmutable|null a date if the cell exists and contains a number, `null` otherwise.
718
718
* @throws \InvalidArgumentException if `$cellName` has an invalid format
719
719
* @throws XlsxFastEditorFileFormatException
@@ -729,7 +729,7 @@ public function readDateTime(int $sheetNumber, string $cellName): ?\DateTimeImmu
729
729
* Read an integer in the given worksheet at the given cell location.
730
730
*
731
731
* @param int $sheetNumber Worksheet number (base 1)
732
- * @param string $cellName Cell name such as `B4 `
732
+ * @param string $cellName Cell name such as `'B4' `
733
733
* @return int|null an integer if the cell exists and contains a number, `null` otherwise.
734
734
* @throws \InvalidArgumentException if `$cellName` has an invalid format
735
735
* @throws XlsxFastEditorFileFormatException
@@ -769,7 +769,7 @@ public function _getSharedString(int $stringNumber): ?string
769
769
* compatible with the shared string approach.
770
770
*
771
771
* @param int $sheetNumber Worksheet number (base 1)
772
- * @param string $cellName Cell name such as `B4 `
772
+ * @param string $cellName Cell name such as `'B4' `
773
773
* @return string|null a string if the cell exists and contains a value, `null` otherwise.
774
774
* @throws \InvalidArgumentException if `$cellName` has an invalid format
775
775
* @throws XlsxFastEditorFileFormatException
@@ -812,7 +812,7 @@ public function _getHyperlink(int $sheetNumber, string $rId): ?string
812
812
* Read a hyperlink in the given worksheet at the given cell location.
813
813
*
814
814
* @param int $sheetNumber Worksheet number (base 1)
815
- * @param string $cellName Cell name such as `B4 `
815
+ * @param string $cellName Cell name such as `'B4' `
816
816
* @return string|null a string if the cell exists and contains a hyperlink, `null` otherwise.
817
817
* @throws \InvalidArgumentException if `$cellName` has an invalid format
818
818
* @throws XlsxFastEditorFileFormatException
@@ -860,7 +860,7 @@ public function _setHyperlink(int $sheetNumber, string $rId, string $value): boo
860
860
* Warning: does not support the creation of a new hyperlink.
861
861
*
862
862
* @param int $sheetNumber Worksheet number (base 1)
863
- * @param string $cellName Cell name such as `B4 `
863
+ * @param string $cellName Cell name such as `'B4' `
864
864
* @return bool True if the hyperlink could be replaced, false otherwise.
865
865
* @throws \InvalidArgumentException if `$cellName` has an invalid format
866
866
* @throws XlsxFastEditorFileFormatException
@@ -878,7 +878,7 @@ public function writeHyperlink(int $sheetNumber, string $cellName, string $value
878
878
* Removes the formulas of the cell, if any.
879
879
*
880
880
* @param int $sheetNumber Worksheet number (base 1)
881
- * @param string $cellName Cell name such as `B4 `
881
+ * @param string $cellName Cell name such as `'B4' `
882
882
* @throws \InvalidArgumentException if `$cellName` has an invalid format
883
883
* @throws XlsxFastEditorFileFormatException
884
884
* @throws XlsxFastEditorXmlException
@@ -895,7 +895,7 @@ public function writeFormula(int $sheetNumber, string $cellName, string $value):
895
895
* Removes the formulas of the cell, if any.
896
896
*
897
897
* @param int $sheetNumber Worksheet number (base 1)
898
- * @param string $cellName Cell name such as `B4 `
898
+ * @param string $cellName Cell name such as `'B4' `
899
899
* @param float $value
900
900
* @throws \InvalidArgumentException if `$cellName` has an invalid format
901
901
* @throws XlsxFastEditorFileFormatException
@@ -913,7 +913,7 @@ public function writeFloat(int $sheetNumber, string $cellName, float $value): vo
913
913
* Removes the formulas of the cell, if any.
914
914
*
915
915
* @param int $sheetNumber Worksheet number (base 1)
916
- * @param string $cellName Cell name such as `B4 `
916
+ * @param string $cellName Cell name such as `'B4' `
917
917
* @param int $value
918
918
* @throws \InvalidArgumentException if `$cellName` has an invalid format
919
919
* @throws XlsxFastEditorFileFormatException
@@ -976,7 +976,7 @@ public function _makeNewSharedString(string $value): int
976
976
* Removes the formulas of the cell, if any.
977
977
*
978
978
* @param int $sheetNumber Worksheet number (base 1)
979
- * @param string $cellName Cell name such as `B4 `
979
+ * @param string $cellName Cell name such as `'B4' `
980
980
* @throws \InvalidArgumentException if `$cellName` has an invalid format
981
981
* @throws XlsxFastEditorFileFormatException
982
982
* @throws XlsxFastEditorXmlException
0 commit comments