@@ -63,7 +63,7 @@ class Worksheet
63
63
/**
64
64
* Invalid characters in sheet title.
65
65
*/
66
- private static array $ invalidCharacters = ['* ' , ': ' , '/ ' , '\\' , '? ' , '[ ' , '] ' ];
66
+ private const INVALID_CHARACTERS = ['* ' , ': ' , '/ ' , '\\' , '? ' , '[ ' , '] ' ];
67
67
68
68
/**
69
69
* Parent spreadsheet.
@@ -157,13 +157,6 @@ class Worksheet
157
157
*/
158
158
private Protection $ protection ;
159
159
160
- /**
161
- * Collection of styles.
162
- *
163
- * @var Style[]
164
- */
165
- private array $ styles = [];
166
-
167
160
/**
168
161
* Conditional styles. Indexed by cell coordinate, e.g. 'A1'.
169
162
*/
@@ -400,7 +393,7 @@ public function getCellCollection(): Cells
400
393
*/
401
394
public static function getInvalidCharacters (): array
402
395
{
403
- return self ::$ invalidCharacters ;
396
+ return self ::INVALID_CHARACTERS ;
404
397
}
405
398
406
399
/**
@@ -418,7 +411,7 @@ private static function checkSheetCodeName(string $sheetCodeName): string
418
411
}
419
412
// Some of the printable ASCII characters are invalid: * : / \ ? [ ] and first and last characters cannot be a "'"
420
413
if (
421
- (str_replace (self ::$ invalidCharacters , '' , $ sheetCodeName ) !== $ sheetCodeName )
414
+ (str_replace (self ::INVALID_CHARACTERS , '' , $ sheetCodeName ) !== $ sheetCodeName )
422
415
|| (Shared \StringHelper::substring ($ sheetCodeName , -1 , 1 ) == '\'' )
423
416
|| (Shared \StringHelper::substring ($ sheetCodeName , 0 , 1 ) == '\'' )
424
417
) {
@@ -443,7 +436,7 @@ private static function checkSheetCodeName(string $sheetCodeName): string
443
436
private static function checkSheetTitle (string $ sheetTitle ): string
444
437
{
445
438
// Some of the printable ASCII characters are invalid: * : / \ ? [ ]
446
- if (str_replace (self ::$ invalidCharacters , '' , $ sheetTitle ) !== $ sheetTitle ) {
439
+ if (str_replace (self ::INVALID_CHARACTERS , '' , $ sheetTitle ) !== $ sheetTitle ) {
447
440
throw new Exception ('Invalid character found in sheet title ' );
448
441
}
449
442
@@ -1393,16 +1386,6 @@ public function getColumnStyle(string $column): ?Style
1393
1386
);
1394
1387
}
1395
1388
1396
- /**
1397
- * Get styles.
1398
- *
1399
- * @return Style[]
1400
- */
1401
- public function getStyles (): array
1402
- {
1403
- return $ this ->styles ;
1404
- }
1405
-
1406
1389
/**
1407
1390
* Get style for cell.
1408
1391
*
0 commit comments