66use PhpOffice \PhpSpreadsheet \Cell \Cell ;
77use PhpOffice \PhpSpreadsheet \IOFactory ;
88use PhpOffice \PhpSpreadsheet \Spreadsheet ;
9- use PhpOffice \PhpSpreadsheet \Worksheet \Column ;
10- use PhpOffice \PhpSpreadsheet \Worksheet \Row ;
119use PhpOffice \PhpSpreadsheet \Worksheet \Worksheet ;
1210
1311class LocaleGenerator
@@ -280,11 +278,9 @@ protected function mapLanguageColumns(Worksheet $translationWorksheet): array
280278
281279 $ languageNameMap = [];
282280 foreach ($ languagesList as $ languageColumn ) {
283- /** @var Column $languageColumn */
284281 $ cells = $ languageColumn ->getCellIterator (self ::LOCALE_NAME_ROW , self ::LOCALE_NAME_ROW );
285282 $ cells ->setIterateOnlyExistingCells (true );
286283 foreach ($ cells as $ cell ) {
287- /** @var Cell $cell */
288284 if ($ this ->localeCanBeSupported ($ translationWorksheet , $ cell )) {
289285 $ languageNameMap [$ cell ->getColumn ()] = $ cell ->getValue ();
290286 $ this ->log ($ cell ->getColumn () . ' -> ' . $ cell ->getValue ());
@@ -316,11 +312,9 @@ protected function mapErrorCodeRows(): void
316312 $ errorList = $ this ->localeTranslations ->getRowIterator (self ::ERROR_CODES_FIRST_ROW );
317313
318314 foreach ($ errorList as $ errorRow ) {
319- /** @var Row $errorList */
320315 $ cells = $ errorRow ->getCellIterator (self ::ENGLISH_REFERENCE_COLUMN , self ::ENGLISH_REFERENCE_COLUMN );
321316 $ cells ->setIterateOnlyExistingCells (true );
322317 foreach ($ cells as $ cell ) {
323- /** @var Cell $cell */
324318 if ($ cell ->getValue () != '' ) {
325319 $ this ->log ($ cell ->getRow () . ' -> ' . $ cell ->getValue ());
326320 $ this ->errorCodeMap [$ cell ->getValue ()] = $ cell ->getRow ();
@@ -335,11 +329,9 @@ protected function mapFunctionNameRows(): void
335329 $ functionList = $ this ->functionNameTranslations ->getRowIterator (self ::FUNCTION_NAME_LIST_FIRST_ROW );
336330
337331 foreach ($ functionList as $ functionRow ) {
338- /** @var Row $functionRow */
339332 $ cells = $ functionRow ->getCellIterator (self ::ENGLISH_REFERENCE_COLUMN , self ::ENGLISH_REFERENCE_COLUMN );
340333 $ cells ->setIterateOnlyExistingCells (true );
341334 foreach ($ cells as $ cell ) {
342- /** @var Cell $cell */
343335 if ($ this ->isFunctionCategoryEntry ($ cell )) {
344336 if (!empty ($ cell ->getValue ())) {
345337 $ this ->log ('CATEGORY: ' . $ cell ->getValue ());
@@ -348,7 +340,7 @@ protected function mapFunctionNameRows(): void
348340
349341 continue ;
350342 }
351- if ($ cell ->getValue () !== '' ) {
343+ if ($ cell ->getValue () !== '' && $ cell -> getValue () !== null ) {
352344 if (is_bool ($ cell ->getValue ())) {
353345 $ this ->log ($ cell ->getRow () . ' -> ' . ($ cell ->getValue () ? 'TRUE ' : 'FALSE ' ));
354346 $ this ->functionNameMap [($ cell ->getValue () ? 'TRUE ' : 'FALSE ' )] = $ cell ->getRow ();
0 commit comments