| @@ -11,8 +11,10 @@ | ||
| 11 | 11 | * @author Matt Kruse, Matt Roxburgh, Vadim Tkachenko, Tobias Bäthge |
| 12 | 12 | * @since 1.1.0 |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | +declare(strict_types=1); | |
| 16 | + | |
| 15 | 17 | // Prohibit direct script loading. |
| 16 | 18 | defined( 'ABSPATH' ) || die( 'No direct script access allowed!' ); |
| 17 | 19 | |
| 18 | 20 | /** |
| @@ -57,35 +59,31 @@ | ||
| 57 | 59 | /** |
| 58 | 60 | * [$data description] |
| 59 | 61 | * |
| 60 | 62 | * @since 1.0.0 |
| 61 | - * @var string | |
| 62 | 63 | */ |
| 63 | - protected $data = ''; | |
| 64 | + protected string $data = ''; | |
| 64 | 65 | |
| 65 | 66 | /** |
| 66 | 67 | * [$error description] |
| 67 | 68 | * |
| 68 | 69 | * @since 1.0.0 |
| 69 | - * @var int | |
| 70 | 70 | */ |
| 71 | - public $error; | |
| 71 | + public int $error; | |
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * [$bigBlockChain description] |
| 75 | 75 | * |
| 76 | 76 | * @since 1.0.0 |
| 77 | - * @var array | |
| 78 | 77 | */ |
| 79 | - protected $bigBlockChain = array(); | |
| 78 | + protected array $bigBlockChain = array(); | |
| 80 | 79 | |
| 81 | 80 | /** |
| 82 | 81 | * [$smallBlockChain description] |
| 83 | 82 | * |
| 84 | 83 | * @since 1.0.0 |
| 85 | - * @var array | |
| 86 | 84 | */ |
| 87 | - protected $smallBlockChain = array(); | |
| 85 | + protected array $smallBlockChain = array(); | |
| 88 | 86 | |
| 89 | 87 | /** |
| 90 | 88 | * [$entry description] |
| 91 | 89 | * |
| @@ -382,35 +380,31 @@ | ||
| 382 | 380 | /** |
| 383 | 381 | * [$colnames description] |
| 384 | 382 | * |
| 385 | 383 | * @since 1.0.0 |
| 386 | - * @var array | |
| 387 | 384 | */ |
| 388 | - public $colnames = array(); | |
| 385 | + public array $colnames = array(); | |
| 389 | 386 | |
| 390 | 387 | /** |
| 391 | 388 | * [$colindexes description] |
| 392 | 389 | * |
| 393 | 390 | * @since 1.0.0 |
| 394 | - * @var array | |
| 395 | 391 | */ |
| 396 | - public $colindexes = array(); | |
| 392 | + public array $colindexes = array(); | |
| 397 | 393 | |
| 398 | 394 | /** |
| 399 | 395 | * [$standardColWidth description] |
| 400 | 396 | * |
| 401 | 397 | * @since 1.0.0 |
| 402 | - * @var int | |
| 403 | 398 | */ |
| 404 | - public $standardColWidth = 0; | |
| 399 | + public int $standardColWidth = 0; | |
| 405 | 400 | |
| 406 | 401 | /** |
| 407 | 402 | * [$defaultColWidth description] |
| 408 | 403 | * |
| 409 | 404 | * @since 1.0.0 |
| 410 | - * @var int | |
| 411 | 405 | */ |
| 412 | - public $defaultColWidth = 0; | |
| 406 | + public int $defaultColWidth = 0; | |
| 413 | 407 | |
| 414 | 408 | /** |
| 415 | 409 | * [$store_extended_info description] |
| 416 | 410 | * |
| @@ -1275,33 +1269,32 @@ | ||
| 1275 | 1269 | |
| 1276 | 1270 | // -------------- |
| 1277 | 1271 | // END PUBLIC API |
| 1278 | 1272 | |
| 1279 | - protected $boundsheets = array(); | |
| 1280 | - protected $formatRecords = array(); | |
| 1281 | - protected $fontRecords = array(); | |
| 1282 | - protected $xfRecords = array(); | |
| 1283 | - protected $colInfo = array(); | |
| 1284 | - protected $rowInfo = array(); | |
| 1273 | + protected array $boundsheets = array(); | |
| 1274 | + protected array $formatRecords = array(); | |
| 1275 | + protected array $fontRecords = array(); | |
| 1276 | + protected array $xfRecords = array(); | |
| 1277 | + protected array $colInfo = array(); | |
| 1278 | + protected array $rowInfo = array(); | |
| 1285 | 1279 | |
| 1286 | - protected $sst = array(); | |
| 1287 | - protected $sheets = array(); | |
| 1280 | + protected array $sst = array(); | |
| 1281 | + protected array $sheets = array(); | |
| 1288 | 1282 | |
| 1289 | 1283 | protected $data; |
| 1290 | 1284 | protected $_ole; |
| 1291 | - protected $_defaultEncoding = 'UTF-8'; | |
| 1292 | - protected $_defaultFormat = SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT; | |
| 1293 | - protected $_columnsFormat = array(); | |
| 1294 | - protected $_rowoffset = 1; | |
| 1295 | - protected $_coloffset = 1; | |
| 1285 | + protected string $_defaultEncoding = 'UTF-8'; | |
| 1286 | + protected string $_defaultFormat = SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT; | |
| 1287 | + protected array $_columnsFormat = array(); | |
| 1288 | + protected int $_rowoffset = 1; | |
| 1289 | + protected int $_coloffset = 1; | |
| 1296 | 1290 | |
| 1297 | 1291 | /** |
| 1298 | 1292 | * List of default date formats used by Excel |
| 1299 | 1293 | * |
| 1300 | 1294 | * @since 1.0.0 |
| 1301 | - * @var array | |
| 1302 | 1295 | */ |
| 1303 | - protected $dateFormats = array( | |
| 1296 | + protected array $dateFormats = array( | |
| 1304 | 1297 | 0xe => 'm/d/Y', |
| 1305 | 1298 | 0xf => 'M-d-Y', |
| 1306 | 1299 | 0x10 => 'd-M', |
| 1307 | 1300 | 0x11 => 'M-Y', |
| @@ -1318,11 +1311,10 @@ | ||
| 1318 | 1311 | /** |
| 1319 | 1312 | * Default number formats used by Excel |
| 1320 | 1313 | * |
| 1321 | 1314 | * @since 1.0.0 |
| 1322 | - * @var array | |
| 1323 | 1315 | */ |
| 1324 | - protected $numberFormats = array( | |
| 1316 | + protected array $numberFormats = array( | |
| 1325 | 1317 | 0x1 => '0', |
| 1326 | 1318 | 0x2 => '0.00', |
| 1327 | 1319 | 0x3 => '#,##0', |
| 1328 | 1320 | 0x4 => '#,##0.00', |
| @@ -1347,11 +1339,10 @@ | ||
| 1347 | 1339 | /** |
| 1348 | 1340 | * [$colors description] |
| 1349 | 1341 | * |
| 1350 | 1342 | * @since 1.0.0 |
| 1351 | - * @var array | |
| 1352 | 1343 | */ |
| 1353 | - protected $colors = array( | |
| 1344 | + protected array $colors = array( | |
| 1354 | 1345 | 0x00 => '#000000', |
| 1355 | 1346 | 0x01 => '#FFFFFF', |
| 1356 | 1347 | 0x02 => '#FF0000', |
| 1357 | 1348 | 0x03 => '#00FF00', |
| @@ -1429,11 +1420,10 @@ | ||
| 1429 | 1420 | /** |
| 1430 | 1421 | * [$lineStyles description] |
| 1431 | 1422 | * |
| 1432 | 1423 | * @since 1.0.0 |
| 1433 | - * @var array | |
| 1434 | 1424 | */ |
| 1435 | - protected $lineStyles = array( | |
| 1425 | + protected array $lineStyles = array( | |
| 1436 | 1426 | 0x00 => '', |
| 1437 | 1427 | 0x01 => 'Thin', |
| 1438 | 1428 | 0x02 => 'Medium', |
| 1439 | 1429 | 0x03 => 'Dashed', |
| @@ -1452,11 +1442,10 @@ | ||
| 1452 | 1442 | /** |
| 1453 | 1443 | * [$lineStylesCss description] |
| 1454 | 1444 | * |
| 1455 | 1445 | * @since 1.0.0 |
| 1456 | - * @var array | |
| 1457 | 1446 | */ |
| 1458 | - protected $lineStylesCss = array( | |
| 1447 | + protected array $lineStylesCss = array( | |
| 1459 | 1448 | 'Thin' => '1px solid', |
| 1460 | 1449 | 'Medium' => '2px solid', |
| 1461 | 1450 | 'Dashed' => '1px dashed', |
| 1462 | 1451 | 'Dotted' => '1px dotted', |