Make global usage of use instead of FQCN

Closes #78
Closes #147
This commit is contained in:
Zharikov Viktor
2017-05-18 00:02:17 +02:00
committed by Adrien Crivelli
parent 77199c9877
commit 07455d24f6
294 changed files with 3915 additions and 2974 deletions
+5 -2
View File
@@ -1,5 +1,8 @@
<?php
use InvalidArgumentException;
use PhpOffice\PhpSpreadsheet\IOFactory;
error_reporting(E_ALL);
set_time_limit(0);
@@ -24,8 +27,8 @@ require_once __DIR__ . '/../../../src/Bootstrap.php';
$inputFileName = './sampleData/example_1.xls';
echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
try {
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName);
} catch (\InvalidArgumentException $e) {
$spreadsheet = IOFactory::load($inputFileName);
} catch (InvalidArgumentException $e) {
die('Error loading file "' . pathinfo($inputFileName, PATHINFO_BASENAME) . '": ' . $e->getMessage());
}