1010class DocumentGenerator
1111{
1212 /**
13- * @param array[] $phpSpreadsheetFunctions
13+ * @param array<string, array{category: string, functionCall: string|string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool}> $phpSpreadsheetFunctions
1414 */
15- public static function generateFunctionListByCategory (array $ phpSpreadsheetFunctions ): string
15+ public static function generateFunctionListByCategory ($ phpSpreadsheetFunctions ): string
1616 {
1717 $ result = "# Function list by category \n" ;
1818 foreach (self ::getCategories () as $ categoryConstant => $ category ) {
@@ -60,7 +60,7 @@ private static function tableRow(array $lengths, ?array $values = null): string
6060 return rtrim ($ result , ' ' );
6161 }
6262
63- /** @param array<int, string>|scalar $functionCall */
63+ /** @param scalar| string|string[] $functionCall */
6464 private static function getPhpSpreadsheetFunctionText (mixed $ functionCall ): string
6565 {
6666 if (is_string ($ functionCall )) {
@@ -79,15 +79,14 @@ private static function getPhpSpreadsheetFunctionText(mixed $functionCall): stri
7979 }
8080
8181 /**
82- * @param array<string, array< string, int |string> > $phpSpreadsheetFunctions
82+ * @param array<string, array{category: string, functionCall: string |string[], argumentCount: string, passCellReference?: bool, passByReference?: bool[], custom?: bool} > $phpSpreadsheetFunctions
8383 */
8484 public static function generateFunctionListByName (array $ phpSpreadsheetFunctions ): string
8585 {
8686 $ categoryConstants = array_flip (self ::getCategories ());
8787 $ result = "# Function list by name \n" ;
8888 $ lastAlphabet = null ;
8989 foreach ($ phpSpreadsheetFunctions as $ excelFunction => $ functionInfo ) {
90- /** @var string $excelFunction */
9190 $ lengths = [25 , 31 , 37 ];
9291 if ($ lastAlphabet !== $ excelFunction [0 ]) {
9392 $ lastAlphabet = $ excelFunction [0 ];
0 commit comments