6
6
use PhpOffice \PhpSpreadsheet \Cell \Cell ;
7
7
use PhpOffice \PhpSpreadsheet \IOFactory ;
8
8
use PhpOffice \PhpSpreadsheet \Spreadsheet ;
9
- use PhpOffice \PhpSpreadsheet \Worksheet \Column ;
10
- use PhpOffice \PhpSpreadsheet \Worksheet \Row ;
11
9
use PhpOffice \PhpSpreadsheet \Worksheet \Worksheet ;
12
10
13
11
class LocaleGenerator
@@ -280,11 +278,9 @@ protected function mapLanguageColumns(Worksheet $translationWorksheet): array
280
278
281
279
$ languageNameMap = [];
282
280
foreach ($ languagesList as $ languageColumn ) {
283
- /** @var Column $languageColumn */
284
281
$ cells = $ languageColumn ->getCellIterator (self ::LOCALE_NAME_ROW , self ::LOCALE_NAME_ROW );
285
282
$ cells ->setIterateOnlyExistingCells (true );
286
283
foreach ($ cells as $ cell ) {
287
- /** @var Cell $cell */
288
284
if ($ this ->localeCanBeSupported ($ translationWorksheet , $ cell )) {
289
285
$ languageNameMap [$ cell ->getColumn ()] = $ cell ->getValue ();
290
286
$ this ->log ($ cell ->getColumn () . ' -> ' . $ cell ->getValue ());
@@ -316,11 +312,9 @@ protected function mapErrorCodeRows(): void
316
312
$ errorList = $ this ->localeTranslations ->getRowIterator (self ::ERROR_CODES_FIRST_ROW );
317
313
318
314
foreach ($ errorList as $ errorRow ) {
319
- /** @var Row $errorList */
320
315
$ cells = $ errorRow ->getCellIterator (self ::ENGLISH_REFERENCE_COLUMN , self ::ENGLISH_REFERENCE_COLUMN );
321
316
$ cells ->setIterateOnlyExistingCells (true );
322
317
foreach ($ cells as $ cell ) {
323
- /** @var Cell $cell */
324
318
if ($ cell ->getValue () != '' ) {
325
319
$ this ->log ($ cell ->getRow () . ' -> ' . $ cell ->getValue ());
326
320
$ this ->errorCodeMap [$ cell ->getValue ()] = $ cell ->getRow ();
@@ -335,11 +329,9 @@ protected function mapFunctionNameRows(): void
335
329
$ functionList = $ this ->functionNameTranslations ->getRowIterator (self ::FUNCTION_NAME_LIST_FIRST_ROW );
336
330
337
331
foreach ($ functionList as $ functionRow ) {
338
- /** @var Row $functionRow */
339
332
$ cells = $ functionRow ->getCellIterator (self ::ENGLISH_REFERENCE_COLUMN , self ::ENGLISH_REFERENCE_COLUMN );
340
333
$ cells ->setIterateOnlyExistingCells (true );
341
334
foreach ($ cells as $ cell ) {
342
- /** @var Cell $cell */
343
335
if ($ this ->isFunctionCategoryEntry ($ cell )) {
344
336
if (!empty ($ cell ->getValue ())) {
345
337
$ this ->log ('CATEGORY: ' . $ cell ->getValue ());
@@ -348,7 +340,7 @@ protected function mapFunctionNameRows(): void
348
340
349
341
continue ;
350
342
}
351
- if ($ cell ->getValue () !== '' ) {
343
+ if ($ cell ->getValue () !== '' && $ cell -> getValue () !== null ) {
352
344
if (is_bool ($ cell ->getValue ())) {
353
345
$ this ->log ($ cell ->getRow () . ' -> ' . ($ cell ->getValue () ? 'TRUE ' : 'FALSE ' ));
354
346
$ this ->functionNameMap [($ cell ->getValue () ? 'TRUE ' : 'FALSE ' )] = $ cell ->getRow ();
0 commit comments