From 5c932a2ff4b97d4e3086cce051f5cdbe77389bbd Mon Sep 17 00:00:00 2001 From: Michael Chrisco Date: Tue, 13 Oct 2015 14:04:44 -0700 Subject: [PATCH 001/998] Set Text Rotation on cells --- src/Maatwebsite/Excel/Writers/CellWriter.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Maatwebsite/Excel/Writers/CellWriter.php b/src/Maatwebsite/Excel/Writers/CellWriter.php index 7b8534b0e..2de52954c 100644 --- a/src/Maatwebsite/Excel/Writers/CellWriter.php +++ b/src/Maatwebsite/Excel/Writers/CellWriter.php @@ -152,6 +152,17 @@ public function setBorder($top = 'none', $right = 'none', $bottom = 'none', $lef return $this->setStyle('borders', $styles); } + /** + * Set the text rotation + * @param integer $alignment + * @return CellWriter + */ + public function setTextRotation($degrees) + { + $style = $this->getCellStyle()->getAlignment()->setTextRotation($degrees); + return $this; + } + /** * Set the alignment * @param string $alignment From 670216033b9e7498e90287539464834d07046856 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Mon, 26 Oct 2015 11:46:03 +0000 Subject: [PATCH 002/998] Fixed dependencies --- composer.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index eb53b670e..9b4aeead6 100644 --- a/composer.json +++ b/composer.json @@ -18,25 +18,25 @@ } ], "require": { - "php": ">=5.3.0", - "phpoffice/phpexcel": "~1.8.0", - "illuminate/cache": "~5.0|~5.1", - "illuminate/config": "~5.0|~5.1", - "illuminate/filesystem": "~5.0|~5.1", - "illuminate/support": "~5.0|~5.1", + "php": ">=5.4", + "phpoffice/phpexcel": "1.8.*", + "illuminate/cache": "5.0.*|5.1.*", + "illuminate/config": "5.0.*|5.1.*", + "illuminate/filesystem": "5.0.*|5.1.*", + "illuminate/support": "5.0.*|5.1.*", "nesbot/carbon": "~1.0", "tijsverkoyen/css-to-inline-styles": "~1.5" }, "require-dev": { - "phpseclib/phpseclib": ">=0.3.7", + "phpseclib/phpseclib": "~1.0", "phpunit/phpunit": "~4.0", "mockery/mockery": "~0.9", - "orchestra/testbench": "~3.0.0" + "orchestra/testbench": "3.0.*" }, "suggest": { - "illuminate/http": "~5.0|~5.1", - "illuminate/routing": "~5.0|~5.1", - "illuminate/view": "~5.0|~5.1" + "illuminate/http": "5.0.*|5.1.*", + "illuminate/routing": "5.0.*|5.1.*", + "illuminate/view": "5.0.*|5.1.*" }, "autoload": { "classmap": [ From 7b638fbfb0e9bc5d36cd1ab3619dc663ccd5eb99 Mon Sep 17 00:00:00 2001 From: Patrick Brouwers Date: Thu, 10 Dec 2015 17:03:15 +0100 Subject: [PATCH 003/998] Allow for Laravel 5.2 --- composer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.json b/composer.json index 9b4aeead6..6f73626a9 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ "require": { "php": ">=5.4", "phpoffice/phpexcel": "1.8.*", - "illuminate/cache": "5.0.*|5.1.*", - "illuminate/config": "5.0.*|5.1.*", - "illuminate/filesystem": "5.0.*|5.1.*", - "illuminate/support": "5.0.*|5.1.*", + "illuminate/cache": "5.0.*|5.1.*|5.2.*", + "illuminate/config": "5.0.*|5.1.*|5.2.*", + "illuminate/filesystem": "5.0.*|5.1.*|5.2.*", + "illuminate/support": "5.0.*|5.1.*|5.2.*", "nesbot/carbon": "~1.0", "tijsverkoyen/css-to-inline-styles": "~1.5" }, @@ -34,9 +34,9 @@ "orchestra/testbench": "3.0.*" }, "suggest": { - "illuminate/http": "5.0.*|5.1.*", - "illuminate/routing": "5.0.*|5.1.*", - "illuminate/view": "5.0.*|5.1.*" + "illuminate/http": "5.0.*|5.1.*|5.2.*", + "illuminate/routing": "5.0.*|5.1.*|5.2.*", + "illuminate/view": "5.0.*|5.1.*|5.2.*" }, "autoload": { "classmap": [ From 9bbcf033e6f0e3629763b37ad791d7b899b0a08f Mon Sep 17 00:00:00 2001 From: Patrick Brouwers Date: Thu, 10 Dec 2015 19:07:26 +0100 Subject: [PATCH 004/998] Built in support for auto-queueing chunked imports --- .gitignore | 2 +- composer.json | 5 +- docs/import/chunk.md | 20 + dump.rdb | 1 + phpunit.xml | 3 + .../Excel/Readers/ChunkedReadJob.php | 114 ++++++ .../Excel/Readers/LaravelExcelReader.php | 366 ++++++++++++------ tests/Filters/ChunkReadFilterTest.php | 130 +++---- tests/Filters/log.txt | 1 + tests/Filters/rounds.txt | 1 + tests/TestCase.php | 3 +- 11 files changed, 447 insertions(+), 199 deletions(-) create mode 100644 dump.rdb create mode 100644 src/Maatwebsite/Excel/Readers/ChunkedReadJob.php create mode 100644 tests/Filters/log.txt create mode 100644 tests/Filters/rounds.txt diff --git a/.gitignore b/.gitignore index 2c1fc0c14..582640226 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /vendor composer.phar composer.lock -.DS_Store \ No newline at end of file +.DS_Store diff --git a/composer.json b/composer.json index 6f73626a9..39063b2fd 100644 --- a/composer.json +++ b/composer.json @@ -31,12 +31,13 @@ "phpseclib/phpseclib": "~1.0", "phpunit/phpunit": "~4.0", "mockery/mockery": "~0.9", - "orchestra/testbench": "3.0.*" + "orchestra/testbench": "3.1.*" }, "suggest": { "illuminate/http": "5.0.*|5.1.*|5.2.*", "illuminate/routing": "5.0.*|5.1.*|5.2.*", - "illuminate/view": "5.0.*|5.1.*|5.2.*" + "illuminate/view": "5.0.*|5.1.*|5.2.*", + "illuminate/queue": "5.0.*|5.1.*|5.2.*" }, "autoload": { "classmap": [ diff --git a/docs/import/chunk.md b/docs/import/chunk.md index e40cce994..d4deff932 100644 --- a/docs/import/chunk.md +++ b/docs/import/chunk.md @@ -41,3 +41,23 @@ Injected ExcelFile example: // or return true if you want to stop importing. }); } + +## Queued chunks + +We automatically queue every chunk for you, if you have enabled the queue driver in your config. + +``` + Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) { + // This will be handled inside the queue + app('log')->info('Import: ' . count($results)); + }); +``` + +If you want to by-pass the behaviour, you can pass `false` as third param of `chunk($size, $callback, $shouldQueue)`. + +``` + Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) { + // This will be handled inside the queue + app('log')->info('Import: ' . count($results)); + }, false); +``` diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 000000000..56af04ea1 --- /dev/null +++ b/dump.rdb @@ -0,0 +1 @@ +REDIS0006�ܳC�Z��V \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 3347b75b7..a215f05ce 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -15,4 +15,7 @@ ./tests/ + + + diff --git a/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php b/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php new file mode 100644 index 000000000..2dd74929a --- /dev/null +++ b/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php @@ -0,0 +1,114 @@ +startRow = $startRow; + $this->chunkSize = $chunkSize; + $this->startIndex = $startIndex; + $this->file = $file; + + $this->callback = $shouldQueue ? (new Serializer)->serialize($callback) : $callback; + $this->sheets = $sheets; + $this->shouldQueue = $shouldQueue; + } + + /*** + * Handle the read job + */ + public function handle() + { + $reader = app('excel.reader'); + $reader->injectExcel(app('phpexcel')); + $reader->_init($this->file); + + $filter = new ChunkReadFilter(); + $reader->reader->setLoadSheetsOnly($this->sheets); + $reader->reader->setReadFilter($filter); + $reader->reader->setReadDataOnly(true); + + // Set the rows for the chunking + $filter->setRows($this->startRow, $this->chunkSize); + + // Load file with chunk filter enabled + $reader->excel = $reader->reader->load($this->file); + + // Slice the results + $results = $reader->get()->slice($this->startIndex, $this->chunkSize); + + $callback = $this->shouldQueue ? (new Serializer)->unserialize($this->callback) : $this->callback; + + // Do a callback + if (is_callable($callback)) { + $break = call_user_func($callback, $results); + } + + $reader->_reset(); + unset($reader, $results); + + if ($break) { + return true; + } + } +} diff --git a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php index 97ddb5ed4..53b04694d 100644 --- a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php +++ b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php @@ -2,6 +2,8 @@ use Cache; use Config; +use Illuminate\Foundation\Bus\DispatchesJobs; +use Illuminate\Support\Facades\Queue; use Maatwebsite\Excel\Classes\PHPExcel; use PHPExcel_Cell; use PHPExcel_IOFactory; @@ -13,7 +15,6 @@ use Maatwebsite\Excel\Exceptions\LaravelExcelException; /** - * * LaravelExcel Excel reader * * @category Laravel Excel @@ -23,153 +24,179 @@ * @author Maatwebsite * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL */ -class LaravelExcelReader { +class LaravelExcelReader +{ + use DispatchesJobs; /** * Excel object + * * @var \PHPExcel */ public $excel; /** * Spreadsheet writer + * * @var object */ public $reader; /** * The file to read + * * @var string */ public $file; /** * Selected columns + * * @var array */ - public $columns = array(); + public $columns = []; /** * Spreadsheet title + * * @var string */ public $title; /** * Default extension + * * @var string */ public $ext = 'xls'; /** * Encoding + * * @var boolean */ public $encoding = false; /** * Default format + * * @var stirng */ public $format; /** * The parsed file + * * @var SheetCollection|RowCollection */ public $parsed; /** * Calculate [true/false] + * * @var boolean */ public $calculate; /** * Limit data + * * @var boolean */ protected $limit = false; /** * Amount of rows to skip + * * @var integer */ protected $skip = 0; /** * Slug separator + * * @var string */ public $separator = false; /** * Ignore empty cells + * * @var boolean */ public $ignoreEmpty = false; /** * Format dates + * * @var boolean */ public $formatDates = true; /** * The date columns + * * @var array */ - public $dateColumns = array(); + public $dateColumns = []; /** * If the file has a heading or not + * * @var boolean */ public $noHeading = false; /** * Default date format + * * @var string */ public $dateFormat; /** * Whether the results are cached or not + * * @var boolean */ public $remembered = false; /** * Amount of minutes the results will remain cached + * * @var integer */ public $cacheMinutes = 10; /** * Selected sheets + * * @var array */ - public $selectedSheets = array(); + public $selectedSheets = []; /** * Selected sheet indices + * * @var array */ - public $selectedSheetIndices = array(); + public $selectedSheetIndices = []; /** * Active filter + * * @var PHPExcel_Reader_IReadFilter */ protected $filter; /** * Filters + * * @var array */ - public $filters = array( - 'registered' => array() - ); + public $filters = [ + 'registered' => [] + ]; /** * @var LaravelExcelWorksheet @@ -198,6 +225,7 @@ class LaravelExcelReader { /** * Construct new reader + * * @param Filesystem $filesystem * @param FormatIdentifier $identifier */ @@ -209,9 +237,11 @@ public function __construct(Filesystem $filesystem, FormatIdentifier $identifier /** * Load a file + * * @param string $file * @param string|boolean $encoding * @param bool $noBasePath + * * @return LaravelExcelReader */ public function load($file, $encoding = false, $noBasePath = false) @@ -220,8 +250,9 @@ public function load($file, $encoding = false, $noBasePath = false) $this->_init($file, $encoding, $noBasePath); // Only fetch selected sheets if necessary - if ($this->sheetsSelected()) + if ($this->sheetsSelected()) { $this->reader->setLoadSheetsOnly($this->selectedSheets); + } // Load the file $this->excel = $this->reader->load($this->file); @@ -232,7 +263,8 @@ public function load($file, $encoding = false, $noBasePath = false) /** * @param integer|callable|string $sheetID - * @param null $callback + * @param null $callback + * * @return $this * @throws \PHPExcel_Exception */ @@ -242,25 +274,21 @@ public function sheet($sheetID, $callback = null) $isCallable = false; // Init a new PHPExcel instance without any worksheets - if(!$this->excel instanceof PHPExcel) { + if (!$this->excel instanceof PHPExcel) { $this->original = $this->excel; $this->initClonedExcelObject($this->excel); // Clone all connected sheets - foreach($this->original->getAllSheets() as $sheet) - { + foreach ($this->original->getAllSheets() as $sheet) { $this->excel->createSheet()->cloneParent($sheet); } } // Copy the callback when needed - if(is_callable($sheetID)) - { - $callback = $sheetID; + if (is_callable($sheetID)) { + $callback = $sheetID; $isCallable = true; - } - elseif(is_callable($callback)) - { + } elseif (is_callable($callback)) { $isCallable = true; } @@ -268,8 +296,9 @@ public function sheet($sheetID, $callback = null) $this->sheet = $this->getSheetByIdOrName($sheetID); // Do the callback - if ($isCallable) + if ($isCallable) { call_user_func($callback, $this->sheet); + } // Return the sheet return $this->sheet; @@ -277,28 +306,35 @@ public function sheet($sheetID, $callback = null) /** * Set csv delimiter + * * @param $delimiter + * * @return $this */ public function setDelimiter($delimiter) { $this->delimiter = $delimiter; + return $this; } /** * Set csv enclosure + * * @param $enclosure + * * @return $this */ public function setEnclosure($enclosure) { $this->enclosure = $enclosure; + return $this; } /** * set selected sheets + * * @param array $sheets */ public function setSelectedSheets($sheets) @@ -308,6 +344,7 @@ public function setSelectedSheets($sheets) /** * Check if sheets were selected + * * @return integer */ public function sheetsSelected() @@ -317,20 +354,26 @@ public function sheetsSelected() /** * Check if the file was selected by index + * * @param $index + * * @return boolean */ public function isSelectedByIndex($index) { $selectedSheets = $this->getSelectedSheetIndices(); - if (empty($selectedSheets)) return true; + if (empty($selectedSheets)) { + return true; + } return in_array($index, $selectedSheets) ? true : false; } /** * Set the selected sheet indices + * * @param $sheets + * * @return $this */ public function setSelectedSheetIndices($sheets) @@ -342,6 +385,7 @@ public function setSelectedSheetIndices($sheets) /** * Return the selected sheets + * * @return array */ public function getSelectedSheetIndices() @@ -351,12 +395,14 @@ public function getSelectedSheetIndices() /** * Remember the results for x minutes + * * @param integer $minutes + * * @return LaravelExcelReader */ public function remember($minutes) { - $this->remembered = true; + $this->remembered = true; $this->cacheMinutes = $minutes; return $this; @@ -364,8 +410,10 @@ public function remember($minutes) /** * Read the file through a config file + * * @param string $config * @param callback|null $callback + * * @return SheetCollection */ public function byConfig($config, $callback = null) @@ -377,7 +425,9 @@ public function byConfig($config, $callback = null) /** * Take x rows + * * @param integer $amount + * * @return LaravelExcelReader */ public function take($amount) @@ -390,7 +440,9 @@ public function take($amount) /** * Skip x rows + * * @param integer $amount + * * @return LaravelExcelReader */ public function skip($amount) @@ -403,8 +455,10 @@ public function skip($amount) /** * Limit the results by x + * * @param integer $take * @param integer $skip + * * @return LaravelExcelReader */ public function limit($take, $skip = 0) @@ -420,10 +474,12 @@ public function limit($take, $skip = 0) /** * Select certain columns + * * @param array $columns + * * @return LaravelExcelReader */ - public function select($columns = array()) + public function select($columns = []) { $this->columns = array_merge($this->columns, $columns); @@ -432,43 +488,45 @@ public function select($columns = array()) /** * Return all sheets/rows + * * @param array $columns + * * @return LaravelExcelReader */ - public function all($columns = array()) + public function all($columns = []) { return $this->get($columns); } /** * Get first row/sheet only + * * @param array $columns + * * @return SheetCollection|RowCollection */ - public function first($columns = array()) + public function first($columns = []) { return $this->take(1)->get($columns)->first(); } /** * Get all sheets/rows + * * @param array $columns + * * @return SheetCollection|RowCollection */ - public function get($columns = array()) + public function get($columns = []) { - if ($this->remembered) - { + if ($this->remembered) { // Return cached results - return Cache::remember(md5($this->file), $this->cacheMinutes, function () use (&$columns) - { + return Cache::remember(md5($this->file), $this->cacheMinutes, function () use (&$columns) { $this->_parseFile($columns); return $this->parsed; }); - } - else - { + } else { // return parsed file $this->_parseFile($columns); @@ -477,50 +535,41 @@ public function get($columns = array()) } /** - * Parse the file in chunks - * @param int $size - * @param $callback - * @throws \Exception - * @return void + * Parse the file in chunks and queues the processing of each chunk + * + * @param int $size + * @param callable $callback + * @param bool $shouldQueue */ - public function chunk($size = 10, $callback = null) + public function chunk($size = 10, callable $callback, $shouldQueue = true) { - // Check if the chunk filter has been enabled - if(!in_array('chunk', $this->filters['enabled'])) - throw new \Exception("The chunk filter is not enabled, do so with ->filter('chunk')"); - // Get total rows $totalRows = $this->getTotalRowsOfFile(); - // Only read - $this->reader->setReadDataOnly(true); - $break = false; - // Start the chunking - for ($startRow = 0; $startRow < $totalRows; $startRow += $chunkSize) - { + for ($startRow = 0; $startRow < $totalRows; $startRow += $chunkSize) { + // Set start index $startIndex = ($startRow == 0) ? $startRow : $startRow - 1; - $chunkSize = ($startRow == 0)? $size + 1 : $size; - - // Set the rows for the chunking - $this->filter->setRows($startRow, $chunkSize); - - // Load file with chunk filter enabled - $this->excel = $this->reader->load($this->file); - - // Slice the results - $results = $this->get()->slice($startIndex, $chunkSize); - - // Do a callback - if(is_callable($callback)) { - $break = call_user_func($callback, $results); + $chunkSize = ($startRow == 0) ? $size + 1 : $size; + + $job = new ChunkedReadJob( + $this->file, + $this->reader->getLoadSheetsOnly(), + $startRow, + $startIndex, + $chunkSize, + $callback, + $shouldQueue + ); + + if ($shouldQueue) { + $this->dispatch($job); + } else { + $break = $job->handle(); } - $this->_reset(); - unset($this->excel, $results); - if ($break === true) { break; } @@ -529,7 +578,9 @@ public function chunk($size = 10, $callback = null) /** * Each + * * @param callback $callback + * * @return SheetCollection|RowCollection */ public function each($callback) @@ -539,31 +590,37 @@ public function each($callback) /** * Parse the file to an array. + * * @param array $columns + * * @return array */ - public function toArray($columns = array()) + public function toArray($columns = []) { - return (array) $this->get($columns)->toArray(); + return (array)$this->get($columns)->toArray(); } /** * Parse the file to an object. + * * @param array $columns + * * @return SheetCollection|RowCollection */ - public function toObject($columns = array()) + public function toObject($columns = []) { return $this->get($columns); } /** * Dump the parsed file to a readable array + * * @param array $columns * @param boolean $die + * * @return string */ - public function dump($columns = array(), $die = false) + public function dump($columns = [], $die = false) { echo '
';
         $die ? dd($this->get($columns)) : var_dump($this->get($columns));
@@ -572,35 +629,40 @@ public function dump($columns = array(), $die = false)
 
     /**
      * Die and dump
+     *
      * @param array $columns
+     *
      * @return string
      */
-    public function dd($columns = array())
+    public function dd($columns = [])
     {
         return $this->dump($columns, true);
     }
 
     /**
      * Init the loading
+     *
      * @param      $file
      * @param bool $encoding
      * @param bool $noBasePath
      */
-    protected function _init($file, $encoding = false, $noBasePath = false)
+    public function _init($file, $encoding = false, $noBasePath = false)
     {
         // Set the extension
         $this->_setFile($file, $noBasePath)
-              ->setExtension()
-              ->setTitle()
-              ->_setFormat()
-              ->_setReader()
-              ->_enableFilters()
-              ->_setInputEncoding($encoding);
+             ->setExtension()
+             ->setTitle()
+             ->_setFormat()
+             ->_setReader()
+             ->_enableFilters()
+             ->_setInputEncoding($encoding);
     }
 
     /**
      * Inject the excel object
+     *
      * @param  PHPExcel $excel
+     *
      * @return void
      */
     public function injectExcel($excel)
@@ -611,32 +673,40 @@ public function injectExcel($excel)
 
     /**
      * Set filters
-     * @param array $filters
      *
+     * @param array $filters
      */
-    public function setFilters($filters = array())
+    public function setFilters($filters = [])
     {
         $this->filters = $filters;
     }
 
+    /**
+     * @return PHPExcel_Reader_IReadFilter
+     */
+    public function getFilter()
+    {
+        return $this->filter;
+    }
+
     /**
      * Enable filters
+     *
      * @return $this
      */
     protected function _enableFilters()
     {
         // Loop through the registered filters
-        foreach($this->filters['registered'] as $key => $class)
-        {
+        foreach ($this->filters['registered'] as $key => $class) {
             // Set the filter inside the reader when enabled and the class exists
-            if(in_array($key, $this->filters['enabled']) && class_exists($class))
-            {
+            if (in_array($key, $this->filters['enabled']) && class_exists($class)) {
                 // init new filter (and overrule the current)
                 $this->filter = new $class;
 
                 // Set default rows
-                if(method_exists($this->filter, 'setRows'))
+                if (method_exists($this->filter, 'setRows')) {
                     $this->filter->setRows(0, 1);
+                }
 
                 // Set the read filter
                 $this->reader->setReadFilter($this->filter);
@@ -648,15 +718,18 @@ protected function _enableFilters()
 
     /**
      * Set the file
+     *
      * @param string $file
      * @param bool   $noBasePath
+     *
      * @return $this
      */
     protected function _setFile($file, $noBasePath = false)
     {
         // check if we have a correct path
-        if (!$noBasePath && !realpath($file))
+        if (!$noBasePath && !realpath($file)) {
             $file = base_path($file);
+        }
 
         $this->file = $file;
 
@@ -665,7 +738,9 @@ protected function _setFile($file, $noBasePath = false)
 
     /**
      * Set the spreadsheet title
+     *
      * @param string|boolean $title
+     *
      * @return LaraveExcelReader
      */
     public function setTitle($title = false)
@@ -677,7 +752,9 @@ public function setTitle($title = false)
 
     /**
      * Set extension
+     *
      * @param string|boolean $ext
+     *
      * @return LaraveExcelReader
      */
     public function setExtension($ext = false)
@@ -689,7 +766,9 @@ public function setExtension($ext = false)
 
     /**
      * Set custom value binder
+     *
      * @param string|boolean $ext
+     *
      * @return void
      */
     public function setValueBinder(PHPExcel_Cell_IValueBinder $binder)
@@ -701,6 +780,7 @@ public function setValueBinder(PHPExcel_Cell_IValueBinder $binder)
 
     /**
      * Reset the value binder back to default
+     *
      * @return void
      */
     public function resetValueBinder()
@@ -712,21 +792,25 @@ public function resetValueBinder()
 
     /**
      * Set the date format
+     *
      * @param bool|string $format The date format
+     *
      * @return LaraveExcelReader
      */
     public function setDateFormat($format = false)
     {
         $this->formatDates = $format ? true : false;
-        $this->dateFormat = $format;
+        $this->dateFormat  = $format;
 
         return $this;
     }
 
     /**
      * Enable/disable date formating
+     *
      * @param  boolean $boolean True/false
      * @param  boolean $format
+     *
      * @return LaraveExcelReader
      */
     public function formatDates($boolean = true, $format = false)
@@ -739,12 +823,13 @@ public function formatDates($boolean = true, $format = false)
 
     /**
      * Set the date columns
+     *
      * @return LaraveExcelReader
      */
     public function setDateColumns()
     {
         $this->formatDates = true;
-        $columns = func_get_args();
+        $columns           = func_get_args();
         $this->dateColumns = array_merge($this->dateColumns, array_flatten($columns));
 
         return $this;
@@ -752,7 +837,9 @@ public function setDateColumns()
 
     /**
      * If the file has a table heading or not
+     *
      * @param  boolean $boolean
+     *
      * @return LaraveExcelReader
      */
     public function noHeading($boolean = true)
@@ -764,7 +851,9 @@ public function noHeading($boolean = true)
 
     /**
      * Set the cell name word separator
+     *
      * @param string $separator
+     *
      * @return LaraveExcelReader
      */
     public function setSeparator($separator)
@@ -776,7 +865,9 @@ public function setSeparator($separator)
 
     /**
      * Spelling mistake backwards compatibility
+     *
      * @param  $separator
+     *
      * @return \Maatwebsite\Excel\Readers\LaraveExcelReader
      */
     public function setSeperator($separator)
@@ -786,7 +877,9 @@ public function setSeperator($separator)
 
     /**
      *  Set default calculate
+     *
      * @param bool $boolean Calculate yes or no
+     *
      * @return LaraveExcelReader
      */
     public function calculate($boolean = true)
@@ -798,7 +891,9 @@ public function calculate($boolean = true)
 
     /**
      * Ignore empty cells
+     *
      * @param  boolean $boolean
+     *
      * @return LaraveExcelReader
      */
     public function ignoreEmpty($boolean = true)
@@ -810,12 +905,12 @@ public function ignoreEmpty($boolean = true)
 
     /**
      * Check if the file has een heading
+     *
      * @return boolean
      */
     public function hasHeading()
     {
-        if (!$this->noHeading)
-        {
+        if (!$this->noHeading) {
             $config = Config::get('excel.import.heading', true);
 
             return $config !== false && $config !== 'numeric';
@@ -826,18 +921,21 @@ public function hasHeading()
 
     /**
      * Get the separator
+     *
      * @return string
      */
     public function getSeparator()
     {
-        if ($this->separator)
+        if ($this->separator) {
             return $this->separator;
+        }
 
         return Config::get('excel.import.separator', Config::get('excel.import.seperator', '_'));
     }
 
     /**
      * Get the dateFormat
+     *
      * @return string
      */
     public function getDateFormat()
@@ -847,6 +945,7 @@ public function getDateFormat()
 
     /**
      * Get the date columns
+     *
      * @return array
      */
     public function getDateColumns()
@@ -856,6 +955,7 @@ public function getDateColumns()
 
     /**
      * Check if we need to calculate the formula inside the cell
+     *
      * @return boolean
      */
     public function needsCalculation()
@@ -865,6 +965,7 @@ public function needsCalculation()
 
     /**
      * Check if we need to ignore the empty cells
+     *
      * @return boolean
      */
     public function needsIgnoreEmpty()
@@ -874,6 +975,7 @@ public function needsIgnoreEmpty()
 
     /**
      * Check if we need to format the dates
+     *
      * @return boolean
      */
     public function needsDateFormatting()
@@ -883,6 +985,7 @@ public function needsDateFormatting()
 
     /**
      * Return the amount of rows to skip
+     *
      * @return integer
      */
     public function getSkip()
@@ -892,6 +995,7 @@ public function getSkip()
 
     /**
      * Return the amount of rows to take
+     *
      * @return integer
      */
     public function getLimit()
@@ -901,6 +1005,7 @@ public function getLimit()
 
     /**
      * Get total rows of file
+     *
      * @return integer
      */
     public function getTotalRowsOfFile()
@@ -914,6 +1019,7 @@ public function getTotalRowsOfFile()
 
     /**
      * Get sheet info for active sheet
+     *
      * @return mixed
      */
     public function getSheetInfoForActive()
@@ -921,11 +1027,11 @@ public function getSheetInfoForActive()
         $spreadsheetInfo = $this->reader->listWorksheetInfo($this->file);
 
         // Loop through the info
-        foreach($spreadsheetInfo as $key => $value)
-        {
+        foreach ($spreadsheetInfo as $key => $value) {
             // When we hit the right worksheet
-            if($value['worksheetName'] == $this->getActiveSheet()->getTitle())
+            if ($value['worksheetName'] == $this->getActiveSheet()->getTitle()) {
                 $index = $key;
+            }
         }
 
         // return total rows
@@ -944,14 +1050,17 @@ protected function initClonedExcelObject($clone)
 
     /**
      * Get the sheet by id or name, else get the active sheet
+     *
      * @param callable|integer|string $sheetID
+     *
      * @return \PHPExcel_Worksheet
      */
     protected function getSheetByIdOrName($sheetID)
     {
         // If is a string, return the sheet by name
-        if(is_string($sheetID))
+        if (is_string($sheetID)) {
             return $this->excel->getSheetByName($sheetID);
+        }
 
         // Else it should be the sheet index
         return $this->excel->getSheet($sheetID);
@@ -959,6 +1068,7 @@ protected function getSheetByIdOrName($sheetID)
 
     /**
      * Get the file title
+     *
      * @return string
      */
     public function getTitle()
@@ -968,6 +1078,7 @@ public function getTitle()
 
     /**
      * Get the current filename
+     *
      * @return mixed
      */
     public function getFileName()
@@ -977,12 +1088,15 @@ public function getFileName()
 
     /**
      * Check if the writer has the called method
+     *
      * @param $method
+     *
      * @return bool
      */
     protected function writerHasMethod($method)
     {
         $this->initNewWriterWhenNeeded();
+
         return method_exists($this->writer, $method) ? true : false;
     }
 
@@ -991,8 +1105,7 @@ protected function writerHasMethod($method)
      */
     protected function initNewWriterWhenNeeded()
     {
-        if(!$this->writer)
-        {
+        if (!$this->writer) {
             $this->writer = app('excel.writer');
             $this->writer->injectExcel($this->excel, false);
             $this->writer->setFileName($this->getFileName());
@@ -1002,6 +1115,7 @@ protected function initNewWriterWhenNeeded()
 
     /**
      * Set the write format
+     *
      * @return LaraveExcelReader
      */
     protected function _setFormat()
@@ -1013,21 +1127,24 @@ protected function _setFormat()
 
     /**
      * Parse the file
+     *
      * @param  array $columns
+     *
      * @return void
      */
-    protected function _parseFile($columns = array())
+    protected function _parseFile($columns = [])
     {
         // Merge the selected columns
         $columns = array_merge($this->columns, $columns);
 
         // Parse the file
-        $parser = new ExcelParser($this);
+        $parser       = new ExcelParser($this);
         $this->parsed = $parser->parseFile($columns);
     }
 
     /**
      * Set the writer
+     *
      * @return LaraveExcelReader
      */
     protected function _setReader()
@@ -1041,13 +1158,14 @@ protected function _setReader()
 
     /**
      * Set the input encoding
+     *
      * @param boolean $encoding
+     *
      * @return LaraveExcelReader
      */
     protected function _setInputEncoding($encoding = false)
     {
-        if ($this->format == 'CSV')
-        {
+        if ($this->format == 'CSV') {
             // If no encoding was given, use the config value
             $encoding = $encoding ? $encoding : Config::get('excel.import.encoding.input', 'UTF-8');
             $this->reader->setInputEncoding($encoding);
@@ -1058,24 +1176,25 @@ protected function _setInputEncoding($encoding = false)
 
     /**
      * Set reader defaults
+     *
      * @return void
      */
     protected function _setReaderDefaults()
     {
         // Set CSV delimiter
-        if ($this->format == 'CSV')
-        {
+        if ($this->format == 'CSV') {
             // If no delimiter was given, take from config
-            if(!$this->delimiter)
+            if (!$this->delimiter) {
                 $this->reader->setDelimiter(Config::get('excel.csv.delimiter', ','));
-            else
+            } else {
                 $this->reader->setDelimiter($this->delimiter);
+            }
 
-            if(!$this->enclosure)
+            if (!$this->enclosure) {
                 $this->reader->setEnclosure(Config::get('excel.csv.enclosure', '"'));
-            else
+            } else {
                 $this->reader->setEnclosure($this->enclosure);
-
+            }
         }
 
         // Set default calculate
@@ -1091,7 +1210,7 @@ protected function _setReaderDefaults()
         $this->formatDates = Config::get('excel.import.dates.enabled', true);
 
         // Set default date columns
-        $this->dateColumns = Config::get('excel.import.dates.columns', array());
+        $this->dateColumns = Config::get('excel.import.dates.columns', []);
 
         // Set default include charts
         $this->reader->setIncludeCharts(Config::get('excel.import.includeCharts', false));
@@ -1099,9 +1218,10 @@ protected function _setReaderDefaults()
 
     /**
      * Reset the writer
+     *
      * @return void
      */
-    protected function _reset()
+    public function _reset()
     {
         $this->excel->disconnectWorksheets();
         $this->resetValueBinder();
@@ -1110,6 +1230,7 @@ protected function _reset()
 
     /**
      * Get excel object
+     *
      * @return PHPExcel
      */
     public function getExcel()
@@ -1119,29 +1240,24 @@ public function getExcel()
 
     /**
      * Dynamically call methods
+     *
      * @param  string $method
      * @param  array  $params
+     *
      * @throws LaravelExcelException
      */
     public function __call($method, $params)
     {
         // Call a php excel method
-        if (method_exists($this->excel, $method))
-        {
+        if (method_exists($this->excel, $method)) {
             // Call the method from the excel object with the given params
-            return call_user_func_array(array($this->excel, $method), $params);
-        }
-
-        // If it's a reader method
-        elseif (method_exists($this->reader, $method))
-        {
+            return call_user_func_array([$this->excel, $method], $params);
+        } // If it's a reader method
+        elseif (method_exists($this->reader, $method)) {
             // Call the method from the excel object with the given params
-            return call_user_func_array(array($this->reader, $method), $params);
-        }
-
-        elseif($this->writerHasMethod($method))
-        {
-            return call_user_func_array(array($this->writer, $method), $params);
+            return call_user_func_array([$this->reader, $method], $params);
+        } elseif ($this->writerHasMethod($method)) {
+            return call_user_func_array([$this->writer, $method], $params);
         }
 
         throw new LaravelExcelException('[ERROR] Reader method [' . $method . '] does not exist.');
diff --git a/tests/Filters/ChunkReadFilterTest.php b/tests/Filters/ChunkReadFilterTest.php
index 7d227e0fc..0c4b4c650 100644
--- a/tests/Filters/ChunkReadFilterTest.php
+++ b/tests/Filters/ChunkReadFilterTest.php
@@ -2,7 +2,8 @@
 
 use Mockery as m;
 
-class ChunkReadFilterTest extends TestCase {
+class ChunkReadFilterTest extends TestCase
+{
 
     public function setUp()
     {
@@ -10,102 +11,93 @@ public function setUp()
         $this->excel = app('excel');
     }
 
-
     public function testCanChunkXls()
     {
-        $this->assertCanChunkIntoGroups(1,"sample.xls",20);
-        $this->assertCanChunkIntoGroups(1,"sample.xls",15);
-        $this->assertCanChunkIntoGroups(2,"sample.xls",10);
-        $this->assertCanChunkIntoGroups(3,"sample.xls",5);
-        $this->assertCanChunkIntoGroups(15,"sample.xls",1);
+        $this->assertCanChunkIntoGroups(1, "sample.xls", 20);
+        $this->assertCanChunkIntoGroups(1, "sample.xls", 15);
+        $this->assertCanChunkIntoGroups(2, "sample.xls", 10);
+        $this->assertCanChunkIntoGroups(3, "sample.xls", 5);
+        $this->assertCanChunkIntoGroups(15, "sample.xls", 1);
     }
 
-
     public function testCanChunkXlsx()
     {
-    	$this->assertCanChunkIntoGroups(1,"sample.xlsx",20);
-    	$this->assertCanChunkIntoGroups(1,"sample.xlsx",15);
-    	$this->assertCanChunkIntoGroups(2,"sample.xlsx",10);
-        $this->assertCanChunkIntoGroups(3,"sample.xlsx",5);
-    	$this->assertCanChunkIntoGroups(15,"sample.xlsx",1);
+        $this->assertCanChunkIntoGroups(1, "sample.xlsx", 20);
+        $this->assertCanChunkIntoGroups(1, "sample.xlsx", 15);
+        $this->assertCanChunkIntoGroups(2, "sample.xlsx", 10);
+        $this->assertCanChunkIntoGroups(3, "sample.xlsx", 5);
+        $this->assertCanChunkIntoGroups(15, "sample.xlsx", 1);
     }
 
-
     public function testCanChunkCsv()
     {
-    	$this->assertCanChunkIntoGroups(1,"sample.csv", 20);
-    	$this->assertCanChunkIntoGroups(1,"sample.csv", 15);
-    	$this->assertCanChunkIntoGroups(2,"sample.csv", 10);
-        $this->assertCanChunkIntoGroups(3,"sample.csv", 5);
-    	$this->assertCanChunkIntoGroups(15,"sample.csv", 1);
-    }
-
-
-    public function testCanStopChunkEarly()
-    {
-        $this->assertCanStopChunkEarly(1,"sample.xls", 5);
-        $this->assertCanStopChunkEarly(1,"sample.xlsx", 2);
-        $this->assertCanStopChunkEarly(2,"sample.csv", 1);
+        $this->assertCanChunkIntoGroups(1, "sample.csv", 20);
+        $this->assertCanChunkIntoGroups(1, "sample.csv", 15);
+        $this->assertCanChunkIntoGroups(2, "sample.csv", 10);
+        $this->assertCanChunkIntoGroups(3, "sample.csv", 5);
+        $this->assertCanChunkIntoGroups(15, "sample.csv", 1);
     }
 
-
     public function testCanChunkMultipleSheets()
     {
-        $output = [];
-
-        $rounds = 0;
+        file_put_contents(__DIR__ . '/log.txt', '');
+        file_put_contents(__DIR__ . '/rounds.txt', '');
 
         // test with small chunks
-        $chunk_size = 2;
-        $expected = "1,3,5,7,9,11,13,15,17,19,1,3,5,7,9,11,13,15,17,19";
+        $chunk_size      = 2;
+        $expected        = "1,3,5,7,9,11,13,15,17,19,1,3,5,7,9,11,13,15,17,19";
         $expected_chunks = 10;
 
         // Sheet2 has more rows than sheet 1
-        $this->excel->filter('chunk')->selectSheets('Sheet2')->load(__DIR__ . "/files/multi.xls")->chunk($chunk_size,function($results) use (&$output, &$rounds){
-            $rounds++;
-            foreach ($results as $row) {
-                $output[] = (int) $row->header;
-            }
-        });
-
-        $this->assertEquals($expected, implode(",", $output ), "Chunked ($chunk_size) value not equal with source data.");
-        $this->assertEquals($expected_chunks, $rounds, "Expecting total chunks is $expected_chunks when chunk with size $chunk_size");
-
+        $this->excel->filter('chunk')
+                    ->selectSheets('Sheet2')
+                    ->load(__DIR__ . "/files/multi.xls")
+                    ->chunk($chunk_size, function ($results) {
+                        foreach ($results as $row) {
+                            $output[] = (int)$row->header;
+                        }
+
+                        $previous = file_get_contents(__DIR__ . '/log.txt');
+                        $previous = !empty($previous) ? $previous . ',' : $previous;
+                        $rounds   = file_get_contents(__DIR__ . '/rounds.txt');
+
+                        file_put_contents(__DIR__ . '/log.txt', $previous . implode(',', $output));
+                        file_put_contents(__DIR__ . '/rounds.txt', $rounds . '+');
+                    }, false);
+
+        $output = file_get_contents(__DIR__ . '/log.txt');
+        $rounds = strlen(file_get_contents(__DIR__ . '/rounds.txt'));
+
+        $this->assertEquals($expected, $output, "Chunked ($chunk_size) value not equal with source data.");
+        $this->assertEquals($expected_chunks, $rounds,
+            "Expecting total chunks is $expected_chunks when chunk with size $chunk_size");
     }
 
-
     private function assertCanChunkIntoGroups($expected_chunks, $file, $chunk_size)
     {
-    	$output = [];
-        
-        $rounds = 0;
-
-        $this->excel->filter('chunk')->load(__DIR__ . "/files/{$file}")->chunk($chunk_size,function($results) use (&$output, &$rounds){
-        	$rounds++;
-            foreach ($results as $row) {
-        		$output[] = (int) $row->header;
-        	}
-        });
-
-        $expected = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15";
+        file_put_contents(__DIR__ . '/log.txt', '');
+        file_put_contents(__DIR__ . '/rounds.txt', '');
 
-        $this->assertEquals($expected, implode(",", $output ), "Chunked ($chunk_size) value not equal with source data.");
-        $this->assertEquals($expected_chunks, $rounds, "Expecting total chunks is $expected_chunks when chunk with size $chunk_size");
+        $this->excel->filter('chunk')->load(__DIR__ . "/files/{$file}")->chunk($chunk_size, function ($results) {
 
-    }
+            foreach ($results as $row) {
+                $output[] = (int)$row->header;
+            }
 
-    private function assertCanStopChunkEarly($expected_chunks, $file, $chunk_size)
-    {
-        $rounds = 0;
+            $previous = file_get_contents(__DIR__ . '/log.txt');
+            $previous = !empty($previous) ? $previous . ',' : $previous;
+            $rounds   = file_get_contents(__DIR__ . '/rounds.txt');
 
-        $this->excel->filter('chunk')->load(__DIR__ . "/files/{$file}")->chunk($chunk_size,function($results) use (&$rounds, $expected_chunks){
-            $rounds++;
+            file_put_contents(__DIR__ . '/log.txt', $previous . implode(',', $output));
+            file_put_contents(__DIR__ . '/rounds.txt', $rounds . '+');
+        }, false);
 
-            if ($rounds === $expected_chunks) {
-                return true;
-            }
-        });
+        $output   = file_get_contents(__DIR__ . '/log.txt');
+        $rounds   = strlen(file_get_contents(__DIR__ . '/rounds.txt'));
+        $expected = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15";
 
-        $this->assertEquals($expected_chunks, $rounds, "Expecting total chunks is $expected_chunks when chunk with size $chunk_size");
+        $this->assertEquals($expected, $output, "Chunked ($chunk_size) value not equal with source data.");
+        $this->assertEquals($expected_chunks, $rounds,
+            "Expecting total chunks is $expected_chunks when chunk with size $chunk_size");
     }
 }
diff --git a/tests/Filters/log.txt b/tests/Filters/log.txt
new file mode 100644
index 000000000..620ec9275
--- /dev/null
+++ b/tests/Filters/log.txt
@@ -0,0 +1 @@
+1,3,5,7,9,11,13,15,17,19,1,3,5,7,9,11,13,15,17,19
\ No newline at end of file
diff --git a/tests/Filters/rounds.txt b/tests/Filters/rounds.txt
new file mode 100644
index 000000000..79f6d4445
--- /dev/null
+++ b/tests/Filters/rounds.txt
@@ -0,0 +1 @@
+++++++++++
\ No newline at end of file
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 438105bb7..25d0c8389 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -28,5 +28,4 @@ protected function getPackagePath()
             'Excel'
         )));
     }
-
-}
\ No newline at end of file
+}

From 508f5eabcb800ef8d9fed290da1810ce01b59ccd Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:13:02 +0100
Subject: [PATCH 005/998] Update chunk.md

---
 docs/import/chunk.md | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/docs/import/chunk.md b/docs/import/chunk.md
index d4deff932..ca86cbc08 100644
--- a/docs/import/chunk.md
+++ b/docs/import/chunk.md
@@ -46,18 +46,15 @@ Injected ExcelFile example:
 
 We automatically queue every chunk for you, if you have enabled the queue driver in your config. 
 
-```
- Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
-     // This will be handled inside the queue
-     app('log')->info('Import: ' . count($results));
- });
-```
+     Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+         // This will be handled inside the queue
+         app('log')->info('Import: ' . count($results));
+     });
 
 If you want to by-pass the behaviour, you can pass `false` as third param of `chunk($size, $callback, $shouldQueue)`.
 
-```
- Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
-     // This will be handled inside the queue
-     app('log')->info('Import: ' . count($results));
- }, false);
-```
+
+     Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+         // This will be handled inside the queue
+         app('log')->info('Import: ' . count($results));
+     }, false);

From b7254c8f1df35367f1f8a51c8b021121a43ed36b Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:14:51 +0100
Subject: [PATCH 006/998] Update chunk.md

---
 docs/import/chunk.md | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/docs/import/chunk.md b/docs/import/chunk.md
index ca86cbc08..0d3427330 100644
--- a/docs/import/chunk.md
+++ b/docs/import/chunk.md
@@ -46,15 +46,14 @@ Injected ExcelFile example:
 
 We automatically queue every chunk for you, if you have enabled the queue driver in your config. 
 
-     Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
-         // This will be handled inside the queue
-         app('log')->info('Import: ' . count($results));
-     });
+    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+        // This will be handled inside the queue
+        app('log')->info('Import: ' . count($results));
+    });
 
 If you want to by-pass the behaviour, you can pass `false` as third param of `chunk($size, $callback, $shouldQueue)`.
 
-
-     Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
-         // This will be handled inside the queue
-         app('log')->info('Import: ' . count($results));
-     }, false);
+    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+        // This will be handled inside the queue
+        app('log')->info('Import: ' . count($results));
+    }, false);

From 59646a470373390127102c4bac9e72af5aae26be Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:15:59 +0100
Subject: [PATCH 007/998] Update chunk.md

---
 docs/import/chunk.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/import/chunk.md b/docs/import/chunk.md
index 0d3427330..5c8186873 100644
--- a/docs/import/chunk.md
+++ b/docs/import/chunk.md
@@ -46,14 +46,16 @@ Injected ExcelFile example:
 
 We automatically queue every chunk for you, if you have enabled the queue driver in your config. 
 
-    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results)
+    {
         // This will be handled inside the queue
         app('log')->info('Import: ' . count($results));
     });
 
 If you want to by-pass the behaviour, you can pass `false` as third param of `chunk($size, $callback, $shouldQueue)`.
 
-    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results) {
+    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results)
+    {
         // This will be handled inside the queue
         app('log')->info('Import: ' . count($results));
     }, false);

From e10e74349ed2db46780db5d591512c0d57c44f3a Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:16:40 +0100
Subject: [PATCH 008/998] Update chunk.md

---
 docs/import/chunk.md | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/docs/import/chunk.md b/docs/import/chunk.md
index 5c8186873..0df543b43 100644
--- a/docs/import/chunk.md
+++ b/docs/import/chunk.md
@@ -46,16 +46,4 @@ Injected ExcelFile example:
 
 We automatically queue every chunk for you, if you have enabled the queue driver in your config. 
 
-    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results)
-    {
-        // This will be handled inside the queue
-        app('log')->info('Import: ' . count($results));
-    });
-
 If you want to by-pass the behaviour, you can pass `false` as third param of `chunk($size, $callback, $shouldQueue)`.
-
-    Excel::filter('chunk')->load(storage_path('test2.xls'))->chunk(10, function ($results)
-    {
-        // This will be handled inside the queue
-        app('log')->info('Import: ' . count($results));
-    }, false);

From e0a5afcf86aa4511b291584fae9f00c04e76e60c Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:30:36 +0100
Subject: [PATCH 009/998] Ability to set the encoding for ExcelFile, fixes #617

---
 src/Maatwebsite/Excel/Files/ExcelFile.php | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Files/ExcelFile.php b/src/Maatwebsite/Excel/Files/ExcelFile.php
index 23a284f42..d560b1adb 100644
--- a/src/Maatwebsite/Excel/Files/ExcelFile.php
+++ b/src/Maatwebsite/Excel/Files/ExcelFile.php
@@ -16,6 +16,11 @@ abstract class ExcelFile extends File {
      */
     protected $enclosure;
 
+    /**
+     * @var null
+     */
+    protected $encoding = null;
+
     /**
      * @param Application $app
      * @param Excel       $excel
@@ -83,7 +88,9 @@ public function loadFile()
 
         // Load the file
         $file = $this->excel->load(
-            $this->getFile()
+            $this->getFile(),
+            null,
+            $this->encoding
         );
 
         return $file;

From 1cb6c15bcd4a01782290150cbcaf09703c8a42bc Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 19:33:13 +0100
Subject: [PATCH 010/998] Update README.md

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 054eb7d10..4eba36023 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-## Laravel Excel v2.0.0 for Laravel 5
+## Laravel Excel v2.1.* for Laravel 5
 
 Looking for Laravel Excel for Laravel 4? Visit the [`1.3` branch](https://github.com/Maatwebsite/Laravel-Excel/tree/1.3)
 
@@ -12,7 +12,7 @@ Laravel Excel brings the power of PHPOffice's PHPExcel to Laravel 5 with a touch
 - **Batch** imports
 - A lot of optional **config settings**
 - Easy **cell caching**
-- Chunked importer
+- Chunked and queued importer
 - ExcelFile method injections
 - Editing existing Excel files
 - **Advanced import** by config files

From 63aa2c2011f309787935b53ac2023b70a08c5f1d Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 10 Dec 2015 20:01:23 +0100
Subject: [PATCH 011/998] Bump php version to 5.5

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 39063b2fd..186348613 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
     }
   ],
   "require": {
-    "php": ">=5.4",
+    "php": ">=5.5",
     "phpoffice/phpexcel": "1.8.*",
     "illuminate/cache": "5.0.*|5.1.*|5.2.*",
     "illuminate/config": "5.0.*|5.1.*|5.2.*",

From 8b902f7dbd748ad38a3a6e41d9b85e55e785748f Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Tue, 15 Dec 2015 21:14:25 +0100
Subject: [PATCH 012/998] Support queued chunks in Laravel5 too #627

---
 src/Maatwebsite/Excel/ExcelServiceProvider.php    |  3 ++-
 .../Excel/Readers/LaravelExcelReader.php          | 15 ++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/Maatwebsite/Excel/ExcelServiceProvider.php b/src/Maatwebsite/Excel/ExcelServiceProvider.php
index 1df7f6187..8bad72b40 100644
--- a/src/Maatwebsite/Excel/ExcelServiceProvider.php
+++ b/src/Maatwebsite/Excel/ExcelServiceProvider.php
@@ -119,7 +119,8 @@ protected function bindReaders()
         {
             return new LaravelExcelReader(
                 $app['files'],
-                $app['excel.identifier']
+                $app['excel.identifier'],
+                $app['Illuminate\Contracts\Bus\Dispatcher']
             );
         });
 
diff --git a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
index 53b04694d..5bfce1f6e 100644
--- a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
+++ b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
@@ -2,7 +2,7 @@
 
 use Cache;
 use Config;
-use Illuminate\Foundation\Bus\DispatchesJobs;
+use Illuminate\Contracts\Bus\Dispatcher;
 use Illuminate\Support\Facades\Queue;
 use Maatwebsite\Excel\Classes\PHPExcel;
 use PHPExcel_Cell;
@@ -26,8 +26,6 @@
  */
 class LaravelExcelReader
 {
-    use DispatchesJobs;
-
     /**
      * Excel object
      *
@@ -223,16 +221,23 @@ class LaravelExcelReader
      */
     protected $original;
 
+    /**
+     * @var Dispatcher
+     */
+    protected $dispatcher;
+
     /**
      * Construct new reader
      *
      * @param Filesystem       $filesystem
      * @param FormatIdentifier $identifier
+     * @param Dispatcher       $dispatcher
      */
-    public function __construct(Filesystem $filesystem, FormatIdentifier $identifier)
+    public function __construct(Filesystem $filesystem, FormatIdentifier $identifier, Dispatcher $dispatcher)
     {
         $this->filesystem = $filesystem;
         $this->identifier = $identifier;
+        $this->dispatcher = $dispatcher;
     }
 
     /**
@@ -565,7 +570,7 @@ public function chunk($size = 10, callable $callback, $shouldQueue = true)
             );
 
             if ($shouldQueue) {
-                $this->dispatch($job);
+                $this->dispatcher->dispatch($job);
             } else {
                 $break = $job->handle();
             }

From 4c89f4cb1d30090a256530e1dce0ed3765eca7fa Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Tue, 15 Dec 2015 21:14:50 +0100
Subject: [PATCH 013/998] No more php5.4 support

---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 40abe06c6..124cbac2a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,9 @@
 language: php
 
 php:
-  - 5.4
   - 5.5
   - 5.6
+  - 7
 
 before_script:
   - travis_retry composer self-update
@@ -14,4 +14,4 @@ script: phpunit
 matrix:
   allow_failures:
     - php: hhvm
-  fast_finish: true
\ No newline at end of file
+  fast_finish: true

From 4d7a9f295579b228249848d64492d0ad5a324a14 Mon Sep 17 00:00:00 2001
From: Kirill Zorin 
Date: Thu, 17 Dec 2015 16:20:01 +0300
Subject: [PATCH 014/998] Fix for issue #584. Checking file permissions and
 existence separately.

---
 src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
index d9608a1fa..43f518c97 100644
--- a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
+++ b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
@@ -9,6 +9,7 @@
 use Maatwebsite\Excel\Classes\FormatIdentifier;
 use Maatwebsite\Excel\Classes\LaravelExcelWorksheet;
 use Maatwebsite\Excel\Exceptions\LaravelExcelException;
+use Symfony\Component\Finder\Exception\AccessDeniedException;
 
 /**
  *
@@ -580,8 +581,13 @@ protected function _setStoragePath($path = false)
         $this->storagePath = rtrim($path, '/');
 
         // Make sure the storage path exists
-        if (!$this->filesystem->isWritable($this->storagePath))
+        if (!$this->filesystem->exists($this->storagePath)) {
             $this->filesystem->makeDirectory($this->storagePath, 0777, true);
+        }
+
+        if (!$this->filesystem->isWritable($this->storagePath)) {
+            throw new LaravelExcelException("Permission denied to the storage path");
+        }
     }
 
     /**

From 10709c6b01db6ae3f5f0a9badfebd97e706d2cff Mon Sep 17 00:00:00 2001
From: duxet 
Date: Thu, 14 Jan 2016 10:32:28 +0100
Subject: [PATCH 015/998] Update readme

Add provider param to vendor:publish to publish only files from this package
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 4eba36023..5a4cb6b12 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@ $excel = App::make('excel');
 To publish the config settings in Laravel 5 use:
 
 ```php
-php artisan vendor:publish
+php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider"
 ```
 
 This will add an `excel.php` config file to your config folder.

From 9c3a58cb87d362974e19e060d80c956f1b4f2045 Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 21 Jan 2016 13:58:39 +0100
Subject: [PATCH 016/998] Update to latest version

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 5a4cb6b12..8d20fb048 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Excel::create('Laravel Excel', function($excel) {
 Require this package in your `composer.json` and update composer. This will download the package and PHPExcel of PHPOffice.
 
 ```php
-"maatwebsite/excel": "~2.0.0"
+"maatwebsite/excel": "~2.1.0"
 ```
 
 After updating composer, add the ServiceProvider to the providers array in `config/app.php`

From 78a7b964b96a181e36eb6a010c792180d64847ae Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 21 Jan 2016 13:59:06 +0100
Subject: [PATCH 017/998] Update to latest version

---
 docs/getting-started/installation.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md
index b53da4370..2e9b91276 100644
--- a/docs/getting-started/installation.md
+++ b/docs/getting-started/installation.md
@@ -8,7 +8,7 @@ Require this package in your `composer.json` and update composer. This will down
     
 #### Laravel 5
 
-    "maatwebsite/excel": "~2.0"
+    "maatwebsite/excel": "~2.1.0"
 
 After updating composer, add the ServiceProvider to the providers array in `app/config/app.php`
 

From b676ead73e77930a6f12b6b9c624c6ae744390a8 Mon Sep 17 00:00:00 2001
From: codewizz 
Date: Mon, 29 Feb 2016 16:49:00 +0200
Subject: [PATCH 018/998] Added an explicit row manipulation methods

---
 .../Excel/Classes/LaravelExcelWorksheet.php   | 58 +++++++++++++++----
 1 file changed, 47 insertions(+), 11 deletions(-)

diff --git a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php b/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
index b90c99041..d411c752f 100644
--- a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
+++ b/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
@@ -173,9 +173,10 @@ public function setPageMargin($margin = false)
      * Manipulate a single row
      * @param  integer|callback|array $rowNumber
      * @param  array|callback         $callback
+     * @param  boolean                $explicit
      * @return LaravelExcelWorksheet
      */
-    public function row($rowNumber, $callback = null)
+    public function row($rowNumber, $callback = null, $explicit = false)
     {
         // If a callback is given, handle it with the cell writer
         if ($callback instanceof Closure)
@@ -200,7 +201,11 @@ public function row($rowNumber, $callback = null)
                 $cell = $column . $rowNumber;
 
                 // Set the cell value
-                $this->setCellValue($cell, $rowValue);
+                if ($explicit) {
+                    $this->setCellValueExplicit($cell, $rowValue);
+                } else {
+                    $this->setCellValue($cell, $rowValue);
+                }
                 $column++;
             }
         }
@@ -214,9 +219,10 @@ public function row($rowNumber, $callback = null)
     /**
      * Add multiple rows
      * @param  array $rows
+     * @param  boolean $explicit
      * @return LaravelExcelWorksheet
      */
-    public function rows($rows = array())
+    public function rows($rows = array(), $explicit = false)
     {
         // Get the start row
         $startRow = $this->getStartRow();
@@ -224,7 +230,7 @@ public function rows($rows = array())
         // Add rows
         foreach ($rows as $row)
         {
-            $this->row($startRow, $row);
+            $this->row($startRow, $row, $explicit);
             $startRow++;
         }
 
@@ -235,9 +241,10 @@ public function rows($rows = array())
      * Prepend a row
      * @param  integer        $rowNumber
      * @param  array|callback $callback
+     * @param  boolean        $explicit
      * @return LaravelExcelWorksheet
      */
-    public function prependRow($rowNumber = 1, $callback = null)
+    public function prependRow($rowNumber = 1, $callback = null, $explicit = false)
     {
         // If only one param was given, prepend it before the first row
         if (is_null($callback))
@@ -250,16 +257,28 @@ public function prependRow($rowNumber = 1, $callback = null)
         $this->insertNewRowBefore($rowNumber);
 
         // Add data to row
-        return $this->row($rowNumber, $callback);
+        return $this->row($rowNumber, $callback, $explicit);
+    }
+
+    /**
+     * Prepend a row explicitly
+     * @param  integer        $rowNumber
+     * @param  array|callback $callback
+     * @return LaravelExcelWorksheet
+     */
+    public function prependRowExplicit($rowNumber = 1, $callback = null)
+    {
+        return $this->prependRow($rowNumber, $callback, true);
     }
 
     /**
      * Append a row
      * @param  integer|callback $rowNumber
      * @param  array|callback   $callback
+     * @param  boolean          $explicit
      * @return LaravelExcelWorksheet
      */
-    public function appendRow($rowNumber = 1, $callback = null)
+    public function appendRow($rowNumber = 1, $callback = null, $explicit = false)
     {
         // If only one param was given, add it as very last
         if (is_null($callback))
@@ -269,24 +288,41 @@ public function appendRow($rowNumber = 1, $callback = null)
         }
 
         // Add the row
-        return $this->row($rowNumber, $callback);
+        return $this->row($rowNumber, $callback, $explicit);
+    }
+
+    /**
+     * Append a row explicitly
+     * @param  integer|callback $rowNumber
+     * @param  array|callback   $callback
+     * @return LaravelExcelWorksheet
+     */
+    public function appendRowExplicit($rowNumber = 1, $callback = null)
+    {
+        return $this->appendRow($rowNumber, $callback, true);
     }
 
     /**
      * Manipulate a single cell
      * @param  array|string $cell
      * @param bool|callable $callback $callback
+     * @param       boolean $explicit
      * @return LaravelExcelWorksheet
      */
-    public function cell($cell, $callback = false)
+    public function cell($cell, $callback = false, $explicit = false)
     {
         // If a callback is given, handle it with the cell writer
         if ($callback instanceof Closure)
             return $this->cells($cell, $callback);
 
         // Else if the 2nd param was set, we will use it as a cell value
-        if ($callback)
-            $this->setCellValue($cell, $callback);
+        if ($callback) {
+            if ($explicit) {
+                $this->setCellValueExplicit($cell, $callback);
+            } else {
+                $this->setCellValue($cell, $callback);
+            }
+        }
 
         return $this;
     }

From c380f3e7d113d9466ed45ec2b60ca30da8d2825a Mon Sep 17 00:00:00 2001
From: Matt McDonald 
Date: Tue, 1 Mar 2016 12:04:33 +0000
Subject: [PATCH 019/998] Support for text-indent value

---
 src/Maatwebsite/Excel/Readers/HtmlReader.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Readers/HtmlReader.php b/src/Maatwebsite/Excel/Readers/HtmlReader.php
index bbd083b0e..9d93b57fb 100644
--- a/src/Maatwebsite/Excel/Readers/HtmlReader.php
+++ b/src/Maatwebsite/Excel/Readers/HtmlReader.php
@@ -1229,7 +1229,7 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
                 break;
 
             case 'text-indent':
-                $cells->getAlignment()->setIndent(1);
+                $cells->getAlignment()->setIndent((int)$value);
                 break;
         }
     }

From e078149f2f851c084bf923bf82757d159ece2163 Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Mon, 14 Mar 2016 12:02:59 +0100
Subject: [PATCH 020/998] Create ISSUE_TEMPLATE.md

---
 .github/ISSUE_TEMPLATE.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 .github/ISSUE_TEMPLATE.md

diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000..4dcdb00b8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,13 @@
+Please prefix your issue with one of the following: [BUG] [PROPOSAL] [QUESTION].
+
+### Package version, Laravel version
+
+### Expected behaviour
+
+### Actual behaviour
+
+#### Exception stack trace
+
+#### Screenshot of Excel file
+
+### Steps to reproduce the behaviour

From 33ca8f634167c502771a18e612bd0e853a783150 Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Mon, 14 Mar 2016 12:04:52 +0100
Subject: [PATCH 021/998] Create CONTRIBUTING.md

---
 .github/CONTRIBUTING.md | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 .github/CONTRIBUTING.md

diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 000000000..399077a77
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,22 @@
+# Contribution Guide
+
+### Bug fixes
+
+**ALL** bug fixes should be made to appropriate branch (e.g. `1.1` for 1.1.* bug fixes). Bug fixes should never be sent to the `master` branch.
+
+### Pull Requests
+
+Every pull request should pass the unit tests. If you include new functionality, make sure you include a test. Pull requests will be evaluated and possibly added to the next stable release.
+
+### Feature Requests
+
+If you have an idea for a new feature you would like to see added to Laravel Excel, you may create an issue on GitHub with `[PROPOSAL]` in the title. The feature request will then be reviewed by @Maatwebsite.
+
+### Coding Guidelines
+
+Laravel, and therefore Maatwebsite's Laravel Excel follows the [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) and [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md) coding standards. In addition to these standards, below is a list of other coding standards that should be followed:
+
+- Namespace declarations should be on the same line as `
Date: Tue, 5 Apr 2016 09:21:14 +0200
Subject: [PATCH 022/998] Update namespaces

---
 src/Maatwebsite/Excel/Readers/LaravelExcelReader.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
index 5bfce1f6e..7c2cc54d4 100644
--- a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
+++ b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
@@ -1,7 +1,7 @@
 
Date: Tue, 26 Apr 2016 03:25:19 -0400
Subject: [PATCH 023/998] Move TestCase.php to autoload-dev (#763)

* Move TestCase.php to autoload-dev

Since the TestCase.php is a file only needed for development installs, I wanted to move this to the autoload-dev.

* Remove trailing comma
---
 composer.json | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/composer.json b/composer.json
index 186348613..aa766fbdd 100644
--- a/composer.json
+++ b/composer.json
@@ -41,11 +41,15 @@
   },
   "autoload": {
     "classmap": [
-      "src/Maatwebsite/Excel",
-      "tests/TestCase.php"
+      "src/Maatwebsite/Excel"
     ],
     "psr-0": {
       "Maatwebsite\\Excel\\": "src/"
     }
+  },
+  "autoload-dev": {
+    "classmap": [
+      "tests/TestCase.php"
+    ]
   }
 }

From ab13890a08d2be3626d609d0143407b5f2a4761b Mon Sep 17 00:00:00 2001
From: Dries Vints 
Date: Tue, 26 Apr 2016 09:25:32 +0200
Subject: [PATCH 024/998] Use facade class instead of actual facade (#761)

---
 src/Maatwebsite/Excel/ExcelServiceProvider.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/ExcelServiceProvider.php b/src/Maatwebsite/Excel/ExcelServiceProvider.php
index 8bad72b40..3e6e7c994 100644
--- a/src/Maatwebsite/Excel/ExcelServiceProvider.php
+++ b/src/Maatwebsite/Excel/ExcelServiceProvider.php
@@ -7,6 +7,7 @@
 use Illuminate\Support\Facades\Config;
 use Maatwebsite\Excel\Classes\PHPExcel;
 use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Facades\Response;
 use Maatwebsite\Excel\Parsers\CssParser;
 use Maatwebsite\Excel\Parsers\ViewParser;
 use Maatwebsite\Excel\Classes\FormatIdentifier;
@@ -158,7 +159,7 @@ protected function bindWriters()
         $this->app['excel.writer'] = $this->app->share(function ($app)
         {
             return new LaravelExcelWriter(
-                $app->make('Response'),
+                $app->make(Response::class),
                 $app['files'],
                 $app['excel.identifier']
             );

From 5d9638a7772603889b59db9b452a2a1f8666b02c Mon Sep 17 00:00:00 2001
From: Dries Vints 
Date: Mon, 2 May 2016 20:48:46 +0200
Subject: [PATCH 025/998] Use ::class notation in setup instructions (#776)

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 8d20fb048..98773a649 100644
--- a/README.md
+++ b/README.md
@@ -52,13 +52,13 @@ Require this package in your `composer.json` and update composer. This will down
 After updating composer, add the ServiceProvider to the providers array in `config/app.php`
 
 ```php
-'Maatwebsite\Excel\ExcelServiceProvider',
+Maatwebsite\Excel\ExcelServiceProvider::class,
 ```
 
 You can use the facade for shorter code. Add this to your aliases:
 
 ```php
-'Excel' => 'Maatwebsite\Excel\Facades\Excel',
+'Excel' => Maatwebsite\Excel\Facades\Excel::class,
 ```
 
 The class is bound to the ioC as `excel`

From bcead74a461e2b5d2c5bd93e6672d6ebcbdc7ea0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Benito=20Rodr=C3=ADguez=20Arcos?= 
Date: Tue, 3 May 2016 21:53:14 +0200
Subject: [PATCH 026/998] callback for config reader (#714)

* callback for config reader

* check is callable in load reader
---
 src/Maatwebsite/Excel/Excel.php                      | 4 ++--
 src/Maatwebsite/Excel/Readers/LaravelExcelReader.php | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Maatwebsite/Excel/Excel.php b/src/Maatwebsite/Excel/Excel.php
index ee72d550a..09322ca3c 100644
--- a/src/Maatwebsite/Excel/Excel.php
+++ b/src/Maatwebsite/Excel/Excel.php
@@ -100,7 +100,7 @@ public function create($filename, $callback = null)
      * @param bool           $noBasePath
      * @return LaravelExcelReader
      */
-    public function load($file, $callback = null, $encoding = null, $noBasePath = false)
+    public function load($file, $callback = null, $encoding = null, $noBasePath = false, $callbackConfigReader = null)
     {
         // Reader instance
         $reader = clone $this->reader;
@@ -115,7 +115,7 @@ public function load($file, $callback = null, $encoding = null, $noBasePath = fa
         $encoding = is_string($callback) ? $callback : $encoding;
 
         // Start loading
-        $reader->load($file, $encoding, $noBasePath);
+        $reader->load($file, $encoding, $noBasePath, $callbackConfigReader);
 
         // Do the callback
         if ($callback instanceof Closure)
diff --git a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
index 7c2cc54d4..b76aa82a5 100644
--- a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
+++ b/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
@@ -249,11 +249,15 @@ public function __construct(Filesystem $filesystem, FormatIdentifier $identifier
      *
      * @return LaravelExcelReader
      */
-    public function load($file, $encoding = false, $noBasePath = false)
+    public function load($file, $encoding = false, $noBasePath = false, $callbackConfigReader = null)
     {
         // init the loading
         $this->_init($file, $encoding, $noBasePath);
 
+        if (is_callable($callbackConfigReader)) {
+            call_user_func($callbackConfigReader, $this);
+        }
+
         // Only fetch selected sheets if necessary
         if ($this->sheetsSelected()) {
             $this->reader->setLoadSheetsOnly($this->selectedSheets);

From a9e7646c5622217bfb321412c3ae4f1ca7ce5bfb Mon Sep 17 00:00:00 2001
From: Leandro Alves 
Date: Tue, 10 May 2016 12:03:16 -0300
Subject: [PATCH 027/998] change documentation of cell vertical align value to
 center (#791)

---
 docs/export/cells.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/export/cells.md b/docs/export/cells.md
index f2a41513b..c51d40855 100644
--- a/docs/export/cells.md
+++ b/docs/export/cells.md
@@ -62,4 +62,4 @@ To change the background of a range of cells we can use `->setBackground($color,
 ### Set vertical alignment
 
     // Set vertical alignment to middle
-     $cells->setValignment('middle');
\ No newline at end of file
+     $cells->setValignment('center');

From e20bb2631f744f28ca9ed0da00d7a56bd5603d0a Mon Sep 17 00:00:00 2001
From: ggat 
Date: Thu, 23 Jun 2016 23:54:28 +0400
Subject: [PATCH 028/998] Fix borders for merged cells (#818)

---
 src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
index 43f518c97..218d10a4c 100644
--- a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
+++ b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
@@ -257,6 +257,17 @@ public function export($ext = 'xls', Array $headers = array())
         // Set the extension
         $this->ext = $ext;
 
+        //Fix borders for merged cells
+        foreach($this->getAllSheets() as $sheet){
+
+            foreach($sheet->getMergeCells() as $cells){
+
+                $style = $sheet->getStyle(explode(':', $cells)[0]);
+
+                $sheet->duplicateStyle($style, $cells);
+            }
+        }
+
         // Render the file
         $this->_render();
 

From 3e75a073f6df3fd10b25e42e3dc2004e9c71587f Mon Sep 17 00:00:00 2001
From: Gazder Bence 
Date: Thu, 23 Jun 2016 21:55:09 +0200
Subject: [PATCH 029/998] Update README.md with Laravel 5.2 instructions (#727)

---
 README.md | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/README.md b/README.md
index 98773a649..7ba042971 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,29 @@ Require this package in your `composer.json` and update composer. This will down
 "maatwebsite/excel": "~2.1.0"
 ```
 
+For Laravel 5.2 use you have to install the [laravelcollective/bus](https://laravelcollective.com/docs/5.2/bus#installation) package. 
+Add this to the `composer.json` and update composer:
+
+```php
+"laravelcollective/bus": "^5.2"
+```
+
+Then add the following lines to the `config/app.php`:
+
+```php
+'providers' => [
+    // ...
+    Collective\Bus\BusServiceProvider::class,
+    // ...
+  ],
+  
+  'aliases' => [
+    // ...
+    'Illuminate\Bus\Dispatcher' => Collective\Bus\Dispatcher::class,
+    // ...
+  ],
+```
+
 After updating composer, add the ServiceProvider to the providers array in `config/app.php`
 
 ```php

From d97a86f607a215a7c9be6078b69a84067d36bcbb Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 23 Jun 2016 21:55:24 +0200
Subject: [PATCH 030/998] Update README.md

---
 README.md | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/README.md b/README.md
index 7ba042971..9fa9692d4 100644
--- a/README.md
+++ b/README.md
@@ -64,12 +64,6 @@ Then add the following lines to the `config/app.php`:
     Collective\Bus\BusServiceProvider::class,
     // ...
   ],
-  
-  'aliases' => [
-    // ...
-    'Illuminate\Bus\Dispatcher' => Collective\Bus\Dispatcher::class,
-    // ...
-  ],
 ```
 
 After updating composer, add the ServiceProvider to the providers array in `config/app.php`

From bf7f17b4bc9077682ae6072e474e1b647fd45517 Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 23 Jun 2016 22:04:00 +0200
Subject: [PATCH 031/998] Fix problem with numeric headers #823

---
 src/Maatwebsite/Excel/Collections/CellCollection.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Collections/CellCollection.php b/src/Maatwebsite/Excel/Collections/CellCollection.php
index cdfc3ce06..288ad6a99 100644
--- a/src/Maatwebsite/Excel/Collections/CellCollection.php
+++ b/src/Maatwebsite/Excel/Collections/CellCollection.php
@@ -33,7 +33,7 @@ public function setItems($items)
         {
             $value = !empty($value) || is_numeric($value) ? $value : null;
 
-            if ($name && !is_numeric($name))
+            if ($name)
             {
                 $this->put($name, $value);
             }

From 48a4434719fbe87c5ddf8f4c2737a0a8d6e60f03 Mon Sep 17 00:00:00 2001
From: Michael Troutt 
Date: Tue, 28 Jun 2016 08:37:34 -0500
Subject: [PATCH 032/998] Add setTextIndent() method, updated documentation.
 (#829)

* Add setTextIndent() method.

* Fix "setBorder" array documentation to align with implementation.
---
 docs/export/cells.md                         |  8 +++-----
 src/Maatwebsite/Excel/Writers/CellWriter.php | 11 +++++++++++
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/docs/export/cells.md b/docs/export/cells.md
index c51d40855..3e52b1e60 100644
--- a/docs/export/cells.md
+++ b/docs/export/cells.md
@@ -47,11 +47,9 @@ To change the background of a range of cells we can use `->setBackground($color,
 
     // Set borders with array
     $cells->setBorder(array(
-        'borders' => array(
-            'top'   => array(
-                'style' => 'solid'
-            ),
-        )
+        'top'   => array(
+            'style' => 'solid'
+        ),
     ));
 
 ### Set horizontal alignment
diff --git a/src/Maatwebsite/Excel/Writers/CellWriter.php b/src/Maatwebsite/Excel/Writers/CellWriter.php
index 2de52954c..300f27d10 100644
--- a/src/Maatwebsite/Excel/Writers/CellWriter.php
+++ b/src/Maatwebsite/Excel/Writers/CellWriter.php
@@ -187,6 +187,17 @@ public function setValignment($alignment)
         ));
     }
 
+    /**
+     * Set the text indent
+     * @param integer $indent
+     * @return  CellWriter
+     */
+    public function setTextIndent($indent)
+    {
+      $style = $this->getCellStyle()->getAlignment()->setIndent((int)$indent);
+      return $this;
+    }
+
     /**
      * Set the color style
      * @param         $styleType

From c6ab521e8a5f2a4acc83cb575c4a09733a5e17c9 Mon Sep 17 00:00:00 2001
From: lemon 
Date: Sat, 9 Jul 2016 04:40:10 -0500
Subject: [PATCH 033/998] set use bom for csv file  (#844)

* add set useBom config

* add set use bom for csv file
---
 src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php |  1 +
 src/config/excel.php                                 | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
index 218d10a4c..de976fa98 100644
--- a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
+++ b/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
@@ -523,6 +523,7 @@ protected function _setWriter()
             $this->writer->setDelimiter(Config::get('excel.csv.delimiter', ','));
             $this->writer->setEnclosure(Config::get('excel.csv.enclosure', '"'));
             $this->writer->setLineEnding(Config::get('excel::csv.line_ending', "\r\n"));
+            $this->writer->setUseBOM(Config::get('excel.csv.use_bom', false));
         }
 
         // Set CSV delimiter
diff --git a/src/config/excel.php b/src/config/excel.php
index 7acea7bc0..2ad127703 100644
--- a/src/config/excel.php
+++ b/src/config/excel.php
@@ -134,7 +134,15 @@
         |--------------------------------------------------------------------------
         */
 
-        'line_ending' => "\r\n"
+        'line_ending' => "\r\n",
+
+        /*
+        |--------------------------------------------------------------------------
+        | setUseBom
+        |--------------------------------------------------------------------------
+        */
+
+        'use_bom' => false
     ),
 
     'export'     => array(

From b37eca3d65c1b0913b3b0ee6b125350a66e4adab Mon Sep 17 00:00:00 2001
From: Richard 
Date: Wed, 27 Jul 2016 19:05:43 +0200
Subject: [PATCH 034/998] Add cell setValue method (#864)

I was finding about an hour how to set cell value and finaly i found it in CellWriter.php. I think it should be included in documentation.
---
 docs/export/cells.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/export/cells.md b/docs/export/cells.md
index 3e52b1e60..18fc4121a 100644
--- a/docs/export/cells.md
+++ b/docs/export/cells.md
@@ -3,6 +3,7 @@
     $sheet->cell('A1', function($cell) {
 
         // manipulate the cell
+        $cell->setValue('data1');
 
     });
 

From 42ca2b699241376f0891c1cbb90f1e5363355a85 Mon Sep 17 00:00:00 2001
From: Adam Burton 
Date: Wed, 27 Jul 2016 18:05:52 +0100
Subject: [PATCH 035/998] Update ExcelParser.php (#865)

Fixes an issue where objects (such as PHPExcel_RichText) are used as array indices, causing illegal offset type errors.
---
 src/Maatwebsite/Excel/Parsers/ExcelParser.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/Parsers/ExcelParser.php b/src/Maatwebsite/Excel/Parsers/ExcelParser.php
index d98176c4b..b19e48068 100644
--- a/src/Maatwebsite/Excel/Parsers/ExcelParser.php
+++ b/src/Maatwebsite/Excel/Parsers/ExcelParser.php
@@ -446,7 +446,7 @@ protected function parseCells()
                 if ( $this->cellNeedsParsing($index) )
                 {
                     // Set the value
-                    $parsedCells[$index] = $this->parseCell($index);
+                    $parsedCells[(string) $index] = $this->parseCell($index);
                 }
 
                 $i++;

From 17e9bd7acf5dad119a4f891928b626d02227c165 Mon Sep 17 00:00:00 2001
From: Radostin Bonev 
Date: Tue, 2 Aug 2016 18:06:21 -0400
Subject: [PATCH 036/998] Update requirements for Laravel 5.3 (#872)

Allow the library to use L5.3.
---
 composer.json | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/composer.json b/composer.json
index aa766fbdd..c095ea829 100644
--- a/composer.json
+++ b/composer.json
@@ -20,10 +20,10 @@
   "require": {
     "php": ">=5.5",
     "phpoffice/phpexcel": "1.8.*",
-    "illuminate/cache": "5.0.*|5.1.*|5.2.*",
-    "illuminate/config": "5.0.*|5.1.*|5.2.*",
-    "illuminate/filesystem": "5.0.*|5.1.*|5.2.*",
-    "illuminate/support": "5.0.*|5.1.*|5.2.*",
+    "illuminate/cache": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/config": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/filesystem": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*",
     "nesbot/carbon": "~1.0",
     "tijsverkoyen/css-to-inline-styles": "~1.5"
   },
@@ -34,10 +34,10 @@
     "orchestra/testbench": "3.1.*"
   },
   "suggest": {
-    "illuminate/http": "5.0.*|5.1.*|5.2.*",
-    "illuminate/routing": "5.0.*|5.1.*|5.2.*",
-    "illuminate/view": "5.0.*|5.1.*|5.2.*",
-    "illuminate/queue": "5.0.*|5.1.*|5.2.*"
+    "illuminate/http": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/routing": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/view": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "illuminate/queue": "5.0.*|5.1.*|5.2.*|5.3.*"
   },
   "autoload": {
     "classmap": [

From 01b2a13d83e8c47336dccfdea6e302f988ab8cfd Mon Sep 17 00:00:00 2001
From: Michael Troutt 
Date: Mon, 8 Aug 2016 13:29:50 -0500
Subject: [PATCH 037/998] Fix heading generation when default overridden in
 settings. (#875)

---
 src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php b/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
index d411c752f..1d219bc63 100644
--- a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
+++ b/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
@@ -110,6 +110,9 @@ public function __construct(PHPExcel $pParent = null, $pTitle = 'Worksheet')
     {
         parent::__construct($pParent, $pTitle);
         $this->setParent($pParent);
+        // check if we should generate headings
+        // defaults to true if not overridden by settings
+        $this->autoGenerateHeading = Config::get('excel.export.generate_heading_by_indices', true);
     }
 
     /**
@@ -671,10 +674,7 @@ public function disableHeadingGeneration($boolean = false)
      */
     protected function generateHeadingByIndices()
     {
-        if (!$this->autoGenerateHeading)
-            return false;
-
-        return Config::get('excel.export.generate_heading_by_indices', false);
+        return $this->autoGenerateHeading;
     }
 
     /**

From 86c8796e2169b98abbf44d8b0a2845a0d0f38b14 Mon Sep 17 00:00:00 2001
From: Renato Moura 
Date: Sun, 28 Aug 2016 17:25:31 -0300
Subject: [PATCH 038/998] Removed interface deprecated in laravel 5.2 (#894)

---
 src/Maatwebsite/Excel/Readers/ChunkedReadJob.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php b/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php
index 2dd74929a..4e6003982 100644
--- a/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php
+++ b/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php
@@ -2,12 +2,11 @@
 
 namespace Maatwebsite\Excel\Readers;
 
-use Illuminate\Contracts\Bus\SelfHandling;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Maatwebsite\Excel\Filters\ChunkReadFilter;
 use SuperClosure\Serializer;
 
-class ChunkedReadJob implements SelfHandling, ShouldQueue
+class ChunkedReadJob implements ShouldQueue
 {
     /**
      * @var int

From d3fdd3992f463a6326b8cb3c336cbc06c4775e19 Mon Sep 17 00:00:00 2001
From: Jeroen Noten 
Date: Sun, 28 Aug 2016 22:25:42 +0200
Subject: [PATCH 039/998] Add .gitattributes file (#896)

---
 .gitattributes | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..1d15a0644
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,9 @@
+* text=auto
+
+/.github export-ignore
+/tests export-ignore
+/docs export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.travis.yml export-ignore
+phpunit.xml export-ignore

From b5c91156f6bd29f68f4f2c51186faae4310a5a68 Mon Sep 17 00:00:00 2001
From: Maarten Paauw 
Date: Sun, 28 Aug 2016 22:25:51 +0200
Subject: [PATCH 040/998] Fixed double blockquote (#889)

---
 docs/export/array.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/export/array.md b/docs/export/array.md
index 6213a27aa..fe34947ad 100644
--- a/docs/export/array.md
+++ b/docs/export/array.md
@@ -48,7 +48,7 @@ By default 0 is shown as an empty cell. If you want to change this behaviour, yo
     // Will show 0 as 0
     $sheet->fromArray($data, null, 'A1', true);
 
->> To change the default behaviour, you can use `excel::export.sheets.strictNullComparison` config setting.
+> To change the default behaviour, you can use `excel::export.sheets.strictNullComparison` config setting.
 
 ## Eloquent model
 

From 9cd64157017dc260e559c1a3af1b724098765a02 Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Sun, 11 Sep 2016 12:28:24 +0200
Subject: [PATCH 041/998] Remove install message about collective/bus

---
 README.md | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/README.md b/README.md
index 9fa9692d4..98773a649 100644
--- a/README.md
+++ b/README.md
@@ -49,23 +49,6 @@ Require this package in your `composer.json` and update composer. This will down
 "maatwebsite/excel": "~2.1.0"
 ```
 
-For Laravel 5.2 use you have to install the [laravelcollective/bus](https://laravelcollective.com/docs/5.2/bus#installation) package. 
-Add this to the `composer.json` and update composer:
-
-```php
-"laravelcollective/bus": "^5.2"
-```
-
-Then add the following lines to the `config/app.php`:
-
-```php
-'providers' => [
-    // ...
-    Collective\Bus\BusServiceProvider::class,
-    // ...
-  ],
-```
-
 After updating composer, add the ServiceProvider to the providers array in `config/app.php`
 
 ```php

From 24905c51a8befdb5bffb9806ae1aa7b4b3f55c9a Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Thu, 15 Sep 2016 21:55:25 +0200
Subject: [PATCH 042/998] Alias Excel to excel, so can be resolved properly

---
 src/Maatwebsite/Excel/ExcelServiceProvider.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/Maatwebsite/Excel/ExcelServiceProvider.php b/src/Maatwebsite/Excel/ExcelServiceProvider.php
index 3e6e7c994..bef3e9f22 100644
--- a/src/Maatwebsite/Excel/ExcelServiceProvider.php
+++ b/src/Maatwebsite/Excel/ExcelServiceProvider.php
@@ -186,6 +186,8 @@ protected function bindExcel()
 
             return $excel;
         });
+        
+        $this->app->alias('excel', Excel::class);
     }
 
     /**

From 700eba02f76f2971c81726a4f6a04121c1977e64 Mon Sep 17 00:00:00 2001
From: SirLamer 
Date: Thu, 15 Sep 2016 15:03:21 -0600
Subject: [PATCH 043/998] Correct app alias from 'excel' to 'phpexcel' (#932)

Current release 1.2.5 breaks functionality, this is urgent.
---
 src/Maatwebsite/Excel/ExcelServiceProvider.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Maatwebsite/Excel/ExcelServiceProvider.php b/src/Maatwebsite/Excel/ExcelServiceProvider.php
index bef3e9f22..88863a5cf 100644
--- a/src/Maatwebsite/Excel/ExcelServiceProvider.php
+++ b/src/Maatwebsite/Excel/ExcelServiceProvider.php
@@ -187,7 +187,7 @@ protected function bindExcel()
             return $excel;
         });
         
-        $this->app->alias('excel', Excel::class);
+        $this->app->alias('phpexcel', PHPExcel::class);
     }
 
     /**

From 998734d73350cd02398480dd271afaec65acc23e Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Wed, 21 Sep 2016 16:28:17 +0200
Subject: [PATCH 044/998] Mayor overhaul: decoupled from phpexcel, psr1/2/4

---
 .php_cs                                       |  60 ++
 .php_cs.cache                                 |   1 +
 composer.json                                 |   4 +-
 {src/config => config}/excel.php              | 259 +++----
 docs/reference-guide/closures.md              |  12 +-
 .../PHPExcel}/Classes/Cache.php               |  63 +-
 .../PHPExcel}/Classes/FormatIdentifier.php    |  70 +-
 .../Classes/LaravelExcelWorksheet.php         | 681 ++++++++----------
 .../PHPExcel}/Classes/PHPExcel.php            |  50 +-
 .../PHPExcel}/Collections/CellCollection.php  |  37 +-
 .../PHPExcel}/Collections/ExcelCollection.php |  19 +-
 .../PHPExcel}/Collections/RowCollection.php   |  13 +-
 .../PHPExcel}/Collections/SheetCollection.php |  13 +-
 .../Excel => Drivers/PHPExcel}/Excel.php      | 167 ++---
 .../PHPExcel}/Filters/ChunkReadFilter.php     |  24 +-
 .../PHPExcel}/Parsers/CssParser.php           |  44 +-
 .../PHPExcel}/Parsers/ExcelParser.php         | 252 +++----
 .../PHPExcel}/Parsers/ViewParser.php          |  70 +-
 .../PHPExcel}/Readers/Batch.php               |  70 +-
 .../PHPExcel}/Readers/ChunkedReadJob.php      |   4 +-
 .../PHPExcel}/Readers/ConfigReader.php        |  78 +-
 .../PHPExcel}/Readers/HtmlReader.php          | 604 +++++++---------
 .../PHPExcel}/Readers/LaravelExcelReader.php  | 316 ++++----
 src/Drivers/PHPExcel/Writers/CellWriter.php   | 249 +++++++
 .../PHPExcel}/Writers/LaravelExcelWriter.php  | 277 ++++---
 src/Excel.php                                 |  91 +++
 src/ExcelManager.php                          |  27 +
 src/ExcelServiceProvider.php                  |  69 ++
 .../Exceptions/LaravelExcelException.php      |  13 +-
 src/{Maatwebsite/Excel => }/Facades/Excel.php |  15 +-
 .../Excel => }/Files/ExcelFile.php            |  41 +-
 src/Files/ExportHandler.php                   |  13 +
 src/{Maatwebsite/Excel => }/Files/File.php    |  31 +-
 src/Files/ImportHandler.php                   |  13 +
 .../Excel => }/Files/NewExcelFile.php         |  26 +-
 .../Excel/ExcelServiceProvider.php            | 249 -------
 src/Maatwebsite/Excel/Files/ExportHandler.php |  12 -
 src/Maatwebsite/Excel/Files/ImportHandler.php |  12 -
 src/Maatwebsite/Excel/Writers/CellWriter.php  | 247 -------
 tests/Collections/CellCollectionTest.php      |  18 +-
 tests/Excel/ExcelTestCase.php                 |  36 +-
 tests/Excel/ExcelTester.php                   |  23 +-
 tests/Files/CsvExcelFileTest.php              |  13 +-
 tests/Files/ExcelFileTest.php                 |  29 +-
 tests/Files/NewExcelFileTest.php              |  18 +-
 tests/Files/classes/CsvTestImport.php         |  10 +-
 tests/Files/classes/TestExport.php            |   9 +-
 tests/Files/classes/TestExportHandler.php     |   9 +-
 tests/Files/classes/TestFile.php              |  13 +-
 tests/Files/classes/TestFileHandler.php       |   9 +-
 tests/Files/classes/TestImport.php            |  13 +-
 tests/Files/classes/TestImportHandler.php     |   9 +-
 tests/Files/classes/TestNewFile.php           |   9 +-
 tests/Files/classes/TestNewFileHandler.php    |   9 +-
 tests/Filters/ChunkReadFilterTest.php         |   2 -
 tests/Filters/RegisterFilterTestCase.php      |  35 +-
 tests/Filters/files/sample.csv                |  30 +-
 tests/Readers/ChineseXlsReaderTest.php        |  39 +-
 tests/Readers/CsvReaderTest.php               |  18 +-
 tests/Readers/CustomValueBinderTest.php       |  14 +-
 tests/Readers/MultipleSheetsXlsReaderTest.php |  39 +-
 tests/Readers/ReaderTest.php                  |  14 +-
 tests/Readers/XlsReaderTest.php               |  15 +-
 tests/Readers/XlsxReaderTest.php              |  15 +-
 tests/Readers/ZerosHandlingReaderTest.php     |  16 +-
 tests/Readers/traits/ImportTrait.php          |  21 +-
 .../traits/SingleImportTestingTrait.php       | 132 ++--
 tests/TestCase.php                            |  11 +-
 tests/TestConfig.php                          |   4 +-
 tests/TestServiceProvider.php                 |   5 +-
 tests/Writers/ExcelWriterTest.php             |  76 +-
 71 files changed, 2365 insertions(+), 2644 deletions(-)
 create mode 100644 .php_cs
 create mode 100644 .php_cs.cache
 rename {src/config => config}/excel.php (86%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Classes/Cache.php (71%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Classes/FormatIdentifier.php (88%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Classes/LaravelExcelWorksheet.php (64%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Classes/PHPExcel.php (72%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Collections/CellCollection.php (63%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Collections/ExcelCollection.php (75%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Collections/RowCollection.php (67%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Collections/SheetCollection.php (67%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Excel.php (58%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Filters/ChunkReadFilter.php (73%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Parsers/CssParser.php (78%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Parsers/ExcelParser.php (77%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Parsers/ViewParser.php (58%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Readers/Batch.php (74%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Readers/ChunkedReadJob.php (95%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Readers/ConfigReader.php (72%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Readers/HtmlReader.php (73%)
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Readers/LaravelExcelReader.php (83%)
 create mode 100644 src/Drivers/PHPExcel/Writers/CellWriter.php
 rename src/{Maatwebsite/Excel => Drivers/PHPExcel}/Writers/LaravelExcelWriter.php (70%)
 create mode 100644 src/Excel.php
 create mode 100644 src/ExcelManager.php
 create mode 100644 src/ExcelServiceProvider.php
 rename src/{Maatwebsite/Excel => }/Exceptions/LaravelExcelException.php (71%)
 rename src/{Maatwebsite/Excel => }/Facades/Excel.php (78%)
 rename src/{Maatwebsite/Excel => }/Files/ExcelFile.php (81%)
 create mode 100644 src/Files/ExportHandler.php
 rename src/{Maatwebsite/Excel => }/Files/File.php (78%)
 create mode 100644 src/Files/ImportHandler.php
 rename src/{Maatwebsite/Excel => }/Files/NewExcelFile.php (73%)
 delete mode 100644 src/Maatwebsite/Excel/ExcelServiceProvider.php
 delete mode 100644 src/Maatwebsite/Excel/Files/ExportHandler.php
 delete mode 100644 src/Maatwebsite/Excel/Files/ImportHandler.php
 delete mode 100644 src/Maatwebsite/Excel/Writers/CellWriter.php

diff --git a/.php_cs b/.php_cs
new file mode 100644
index 000000000..f322649f0
--- /dev/null
+++ b/.php_cs
@@ -0,0 +1,60 @@
+exclude([
+        'vendor'
+    ])
+    ->in(__DIR__);
+
+return Symfony\CS\Config\Config::create()
+    ->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
+    ->setUsingCache(true)
+    ->fixers(array(
+        '-psr0',
+        '-psr4',
+        'encoding',
+        'short_tag',
+        'elseif',
+        'blankline_after_open_tag',
+        'namespace_no_leading_whitespace',
+        'no_blank_lines_after_class_opening',
+        'single_array_no_trailing_comma',
+        'no_empty_lines_after_phpdocs',
+        'concat_with_spaces',
+        'function_call_space',
+        'function_declaration',
+        'eof_ending',
+        'ordered_use',
+        'extra_empty_lines',
+        'single_line_after_imports',
+        'trailing_spaces',
+        'remove_lines_between_uses',
+        'return',
+        'indentation',
+        'linefeed',
+        'braces',
+        'visibility',
+        'unused_use',
+        'whitespacy_lines',
+        'php_closing_tag',
+        'phpdoc_order',
+        'phpdoc_params',
+        'phpdoc_trim',
+        'phpdoc_scalar',
+        'phpdoc_short_description',
+        'phpdoc_no_empty_return',
+        'phpdoc_indent',
+        'phpdoc_type_to_var',
+        'phpdoc_var_without_name',
+        'short_array_syntax',
+        'align_double_arrow',
+        'align_equals',
+        'lowercase_constants',
+        'lowercase_keywords',
+        'multiple_use',
+        'line_after_namespace',
+        'method_argument_space',
+        'parenthesis',
+        'unary_operators_spaces',
+        'multiline_array_trailing_comma',
+    ))->finder($finder);
\ No newline at end of file
diff --git a/.php_cs.cache b/.php_cs.cache
new file mode 100644
index 000000000..b78dce6fc
--- /dev/null
+++ b/.php_cs.cache
@@ -0,0 +1 @@
+a:3:{s:7:"version";s:6:"1.11.6";s:6:"fixers";a:45:{i:0;s:18:"align_double_arrow";i:1;s:12:"align_equals";i:2;s:24:"blankline_after_open_tag";i:3;s:6:"braces";i:4;s:18:"concat_with_spaces";i:5;s:6:"elseif";i:6;s:8:"encoding";i:7;s:10:"eof_ending";i:8;s:17:"extra_empty_lines";i:9;s:19:"function_call_space";i:10;s:20:"function_declaration";i:11;s:11:"indentation";i:12;s:20:"line_after_namespace";i:13;s:8:"linefeed";i:14;s:19:"lowercase_constants";i:15;s:18:"lowercase_keywords";i:16;s:21:"method_argument_space";i:17;s:30:"multiline_array_trailing_comma";i:18;s:12:"multiple_use";i:19;s:31:"namespace_no_leading_whitespace";i:20;s:34:"no_blank_lines_after_class_opening";i:21;s:28:"no_empty_lines_after_phpdocs";i:22;s:11:"ordered_use";i:23;s:11:"parenthesis";i:24;s:15:"php_closing_tag";i:25;s:13:"phpdoc_indent";i:26;s:22:"phpdoc_no_empty_return";i:27;s:12:"phpdoc_order";i:28;s:13:"phpdoc_params";i:29;s:13:"phpdoc_scalar";i:30;s:24:"phpdoc_short_description";i:31;s:11:"phpdoc_trim";i:32;s:18:"phpdoc_type_to_var";i:33;s:23:"phpdoc_var_without_name";i:34;s:25:"remove_lines_between_uses";i:35;s:6:"return";i:36;s:18:"short_array_syntax";i:37;s:9:"short_tag";i:38;s:30:"single_array_no_trailing_comma";i:39;s:25:"single_line_after_imports";i:40;s:15:"trailing_spaces";i:41;s:22:"unary_operators_spaces";i:42;s:10:"unused_use";i:43;s:10:"visibility";i:44;s:16:"whitespacy_lines";}s:6:"hashes";a:62:{s:16:"config/excel.php";i:1173128804;s:38:"src/Drivers/PHPExcel/Classes/Cache.php";i:3904479517;s:49:"src/Drivers/PHPExcel/Classes/FormatIdentifier.php";i:3312175569;s:54:"src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php";i:4127291209;s:41:"src/Drivers/PHPExcel/Classes/PHPExcel.php";i:2183746486;s:51:"src/Drivers/PHPExcel/Collections/CellCollection.php";i:3855734396;s:52:"src/Drivers/PHPExcel/Collections/ExcelCollection.php";i:1783836521;s:50:"src/Drivers/PHPExcel/Collections/RowCollection.php";i:3917364025;s:52:"src/Drivers/PHPExcel/Collections/SheetCollection.php";i:598701393;s:30:"src/Drivers/PHPExcel/Excel.php";i:2041369889;s:48:"src/Drivers/PHPExcel/Filters/ChunkReadFilter.php";i:370213494;s:42:"src/Drivers/PHPExcel/Parsers/CssParser.php";i:291468400;s:44:"src/Drivers/PHPExcel/Parsers/ExcelParser.php";i:2240566599;s:43:"src/Drivers/PHPExcel/Parsers/ViewParser.php";i:603320239;s:38:"src/Drivers/PHPExcel/Readers/Batch.php";i:376486304;s:47:"src/Drivers/PHPExcel/Readers/ChunkedReadJob.php";i:494225974;s:45:"src/Drivers/PHPExcel/Readers/ConfigReader.php";i:3238554140;s:43:"src/Drivers/PHPExcel/Readers/HtmlReader.php";i:396548915;s:51:"src/Drivers/PHPExcel/Readers/LaravelExcelReader.php";i:1375350520;s:43:"src/Drivers/PHPExcel/Writers/CellWriter.php";i:887345063;s:51:"src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php";i:2993850334;s:13:"src/Excel.php";i:2660689515;s:20:"src/ExcelManager.php";i:1793019087;s:28:"src/ExcelServiceProvider.php";i:2427218828;s:40:"src/Exceptions/LaravelExcelException.php";i:1644082212;s:21:"src/Facades/Excel.php";i:652229935;s:23:"src/Files/ExcelFile.php";i:2824646715;s:27:"src/Files/ExportHandler.php";i:590137173;s:18:"src/Files/File.php";i:2794766140;s:27:"src/Files/ImportHandler.php";i:581777833;s:26:"src/Files/NewExcelFile.php";i:1626773074;s:40:"tests/Collections/CellCollectionTest.php";i:3107902333;s:29:"tests/Excel/ExcelTestCase.php";i:3525138755;s:27:"tests/Excel/ExcelTester.php";i:4122913651;s:37:"tests/Files/classes/CsvTestImport.php";i:3665541995;s:34:"tests/Files/classes/TestExport.php";i:393827966;s:41:"tests/Files/classes/TestExportHandler.php";i:1082662775;s:32:"tests/Files/classes/TestFile.php";i:363938068;s:39:"tests/Files/classes/TestFileHandler.php";i:478048616;s:34:"tests/Files/classes/TestImport.php";i:230995273;s:41:"tests/Files/classes/TestImportHandler.php";i:3990882985;s:35:"tests/Files/classes/TestNewFile.php";i:54425924;s:42:"tests/Files/classes/TestNewFileHandler.php";i:2264162448;s:32:"tests/Files/CsvExcelFileTest.php";i:1150198657;s:29:"tests/Files/ExcelFileTest.php";i:4270269824;s:32:"tests/Files/NewExcelFileTest.php";i:4109333923;s:37:"tests/Filters/ChunkReadFilterTest.php";i:1114142528;s:40:"tests/Filters/RegisterFilterTestCase.php";i:2996738919;s:38:"tests/Readers/ChineseXlsReaderTest.php";i:1131264947;s:31:"tests/Readers/CsvReaderTest.php";i:748231737;s:39:"tests/Readers/CustomValueBinderTest.php";i:1448578307;s:45:"tests/Readers/MultipleSheetsXlsReaderTest.php";i:2146723105;s:28:"tests/Readers/ReaderTest.php";i:1526884084;s:36:"tests/Readers/traits/ImportTrait.php";i:163964272;s:49:"tests/Readers/traits/SingleImportTestingTrait.php";i:2933273630;s:31:"tests/Readers/XlsReaderTest.php";i:356229840;s:32:"tests/Readers/XlsxReaderTest.php";i:2376448368;s:41:"tests/Readers/ZerosHandlingReaderTest.php";i:3858235616;s:18:"tests/TestCase.php";i:2761530444;s:20:"tests/TestConfig.php";i:4108888961;s:29:"tests/TestServiceProvider.php";i:3639993996;s:33:"tests/Writers/ExcelWriterTest.php";i:4069389983;}}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index c095ea829..d11ec428c 100644
--- a/composer.json
+++ b/composer.json
@@ -41,9 +41,9 @@
   },
   "autoload": {
     "classmap": [
-      "src/Maatwebsite/Excel"
+      "src/"
     ],
-    "psr-0": {
+    "psr-4": {
       "Maatwebsite\\Excel\\": "src/"
     }
   },
diff --git a/src/config/excel.php b/config/excel.php
similarity index 86%
rename from src/config/excel.php
rename to config/excel.php
index 2ad127703..a5816b711 100644
--- a/src/config/excel.php
+++ b/config/excel.php
@@ -1,8 +1,15 @@
  array(
+    /*
+   |--------------------------------------------------------------------------
+   | Excel driver
+   |--------------------------------------------------------------------------
+   */
+    'driver' => 'phpexcel',
+
+    'cache' => [
 
         /*
         |--------------------------------------------------------------------------
@@ -29,24 +36,24 @@
         | Cache settings
         |--------------------------------------------------------------------------
         */
-        'settings' => array(
+        'settings' => [
 
             'memoryCacheSize' => '32MB',
-            'cacheTime'       => 600
+            'cacheTime'       => 600,
 
-        ),
+        ],
 
         /*
         |--------------------------------------------------------------------------
         | Memcache settings
         |--------------------------------------------------------------------------
         */
-        'memcache' => array(
+        'memcache' => [
 
             'host' => 'localhost',
             'port' => 11211,
 
-        ),
+        ],
 
         /*
         |--------------------------------------------------------------------------
@@ -54,10 +61,10 @@
         |--------------------------------------------------------------------------
         */
 
-        'dir'      => storage_path('cache')
-    ),
+        'dir' => storage_path('cache'),
+    ],
 
-    'properties' => array(
+    'properties' => [
         'creator'        => 'Maatwebsite',
         'lastModifiedBy' => 'Maatwebsite',
         'title'          => 'Spreadsheet',
@@ -67,35 +74,35 @@
         'category'       => 'Excel',
         'manager'        => 'Maatwebsite',
         'company'        => 'Maatwebsite',
-    ),
+    ],
 
     /*
     |--------------------------------------------------------------------------
     | Sheets settings
     |--------------------------------------------------------------------------
     */
-    'sheets'     => array(
+    'sheets'     => [
 
         /*
         |--------------------------------------------------------------------------
         | Default page setup
         |--------------------------------------------------------------------------
         */
-        'pageSetup' => array(
+        'pageSetup' => [
             'orientation'           => 'portrait',
             'paperSize'             => '9',
             'scale'                 => '100',
             'fitToPage'             => false,
             'fitToHeight'           => true,
             'fitToWidth'            => true,
-            'columnsToRepeatAtLeft' => array('', ''),
-            'rowsToRepeatAtTop'     => array(0, 0),
+            'columnsToRepeatAtLeft' => ['', ''],
+            'rowsToRepeatAtTop'     => [0, 0],
             'horizontalCentered'    => false,
             'verticalCentered'      => false,
             'printArea'             => null,
             'firstPageNumber'       => null,
-        ),
-    ),
+        ],
+    ],
 
     /*
     |--------------------------------------------------------------------------
@@ -106,9 +113,9 @@
     |
     */
 
-    'creator'    => 'Maatwebsite',
+    'creator' => 'Maatwebsite',
 
-    'csv'        => array(
+    'csv' => [
         /*
        |--------------------------------------------------------------------------
        | Delimiter
@@ -118,7 +125,7 @@
        |
        */
 
-        'delimiter'   => ',',
+        'delimiter' => ',',
 
         /*
         |--------------------------------------------------------------------------
@@ -126,7 +133,7 @@
         |--------------------------------------------------------------------------
         */
 
-        'enclosure'   => '"',
+        'enclosure' => '"',
 
         /*
         |--------------------------------------------------------------------------
@@ -142,10 +149,10 @@
         |--------------------------------------------------------------------------
         */
 
-        'use_bom' => false
-    ),
+        'use_bom' => false,
+    ],
 
-    'export'     => array(
+    'export' => [
 
         /*
         |--------------------------------------------------------------------------
@@ -218,7 +225,7 @@
         | Default sheet settings
         |--------------------------------------------------------------------------
         */
-        'sheets'                      => array(
+        'sheets'                      => [
 
             /*
             |--------------------------------------------------------------------------
@@ -253,8 +260,8 @@
             | Apply strict comparison when testing for null values in the array
             |--------------------------------------------------------------------------
             */
-            'strictNullComparison' => false
-        ),
+            'strictNullComparison' => false,
+        ],
 
         /*
         |--------------------------------------------------------------------------
@@ -262,7 +269,7 @@
         |--------------------------------------------------------------------------
         */
 
-        'store'                       => array(
+        'store' => [
 
             /*
             |--------------------------------------------------------------------------
@@ -282,16 +289,16 @@
             | Whether we want to return information about the stored file or not
             |
             */
-            'returnInfo' => false
+            'returnInfo' => false,
 
-        ),
+        ],
 
         /*
         |--------------------------------------------------------------------------
         | PDF Settings
         |--------------------------------------------------------------------------
         */
-        'pdf'                         => array(
+        'pdf'   => [
 
             /*
             |--------------------------------------------------------------------------
@@ -306,48 +313,48 @@
             | PDF Driver settings
             |--------------------------------------------------------------------------
             */
-            'drivers' => array(
+            'drivers' => [
 
                 /*
                 |--------------------------------------------------------------------------
                 | DomPDF settings
                 |--------------------------------------------------------------------------
                 */
-                'DomPDF' => array(
-                    'path' => base_path('vendor/dompdf/dompdf/')
-                ),
+                'DomPDF' => [
+                    'path' => base_path('vendor/dompdf/dompdf/'),
+                ],
 
                 /*
                 |--------------------------------------------------------------------------
                 | tcPDF settings
                 |--------------------------------------------------------------------------
                 */
-                'tcPDF'  => array(
-                    'path' => base_path('vendor/tecnick.com/tcpdf/')
-                ),
+                'tcPDF'  => [
+                    'path' => base_path('vendor/tecnick.com/tcpdf/'),
+                ],
 
                 /*
                 |--------------------------------------------------------------------------
                 | mPDF settings
                 |--------------------------------------------------------------------------
                 */
-                'mPDF'   => array(
-                    'path' => base_path('vendor/mpdf/mpdf/')
-                ),
-            )
-        )
-    ),
+                'mPDF'   => [
+                    'path' => base_path('vendor/mpdf/mpdf/'),
+                ],
+            ],
+        ],
+    ],
 
-    'filters'    => array(
+    'filters' => [
         /*
         |--------------------------------------------------------------------------
         | Register read filters
         |--------------------------------------------------------------------------
         */
 
-        'registered' => array(
-            'chunk' => 'Maatwebsite\Excel\Filters\ChunkReadFilter'
-        ),
+        'registered' => [
+            'chunk' => 'Maatwebsite\Excel\Drivers\PHPExcel\Filters\ChunkReadFilter',
+        ],
 
         /*
         |--------------------------------------------------------------------------
@@ -355,10 +362,10 @@
         |--------------------------------------------------------------------------
         */
 
-        'enabled'    => array()
-    ),
+        'enabled' => [],
+    ],
 
-    'import'     => array(
+    'import' => [
 
         /*
         |--------------------------------------------------------------------------
@@ -371,7 +378,7 @@
         |
         */
 
-        'heading'                 => 'slugged',
+        'heading' => 'slugged',
 
         /*
         |--------------------------------------------------------------------------
@@ -383,7 +390,7 @@
         |
         */
 
-        'startRow'                => 1,
+        'startRow' => 1,
 
         /*
         |--------------------------------------------------------------------------
@@ -395,7 +402,7 @@
         |
         */
 
-        'separator'               => '_',
+        'separator' => '_',
 
         /*
         |--------------------------------------------------------------------------
@@ -403,7 +410,7 @@
         |--------------------------------------------------------------------------
         */
 
-        'includeCharts'           => false,
+        'includeCharts' => false,
 
         /*
         |--------------------------------------------------------------------------
@@ -415,7 +422,7 @@
         |
         */
 
-        'to_ascii'                => true,
+        'to_ascii' => true,
 
         /*
         |--------------------------------------------------------------------------
@@ -423,12 +430,12 @@
         |--------------------------------------------------------------------------
         */
 
-        'encoding'                => array(
+        'encoding' => [
 
             'input'  => 'UTF-8',
-            'output' => 'UTF-8'
+            'output' => 'UTF-8',
 
-        ),
+        ],
 
         /*
         |--------------------------------------------------------------------------
@@ -439,7 +446,7 @@
         |
         */
 
-        'calculate'               => true,
+        'calculate' => true,
 
         /*
         |--------------------------------------------------------------------------
@@ -474,7 +481,7 @@
         |
         */
 
-        'dates'                   => array(
+        'dates'  => [
 
             /*
             |--------------------------------------------------------------------------
@@ -498,15 +505,15 @@
             | Date columns
             |--------------------------------------------------------------------------
             */
-            'columns' => array()
-        ),
+            'columns' => [],
+        ],
 
         /*
         |--------------------------------------------------------------------------
         | Import sheets by config
         |--------------------------------------------------------------------------
         */
-        'sheets'                  => array(
+        'sheets' => [
 
             /*
             |--------------------------------------------------------------------------
@@ -517,16 +524,16 @@
             |
             */
 
-            'test' => array(
+            'test' => [
 
-                'firstname' => 'A2'
+                'firstname' => 'A2',
 
-            )
+            ],
 
-        )
-    ),
+        ],
+    ],
 
-    'views'      => array(
+    'views' => [
 
         /*
         |--------------------------------------------------------------------------
@@ -537,155 +544,155 @@
         |
         */
 
-        'styles' => array(
+        'styles' => [
 
             /*
             |--------------------------------------------------------------------------
             | Table headings
             |--------------------------------------------------------------------------
             */
-            'th'     => array(
-                'font' => array(
+            'th'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 12,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Strong tags
             |--------------------------------------------------------------------------
             */
-            'strong' => array(
-                'font' => array(
+            'strong' => [
+                'font' => [
                     'bold' => true,
                     'size' => 12,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Bold tags
             |--------------------------------------------------------------------------
             */
-            'b'      => array(
-                'font' => array(
+            'b'      => [
+                'font' => [
                     'bold' => true,
                     'size' => 12,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Italic tags
             |--------------------------------------------------------------------------
             */
-            'i'      => array(
-                'font' => array(
+            'i'      => [
+                'font' => [
                     'italic' => true,
                     'size'   => 12,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Heading 1
             |--------------------------------------------------------------------------
             */
-            'h1'     => array(
-                'font' => array(
+            'h1'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 24,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Heading 2
             |--------------------------------------------------------------------------
             */
-            'h2'     => array(
-                'font' => array(
+            'h2'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 18,
-                )
-            ),
+                ],
+            ],
 
             /*
             |--------------------------------------------------------------------------
             | Heading 2
             |--------------------------------------------------------------------------
             */
-            'h3'     => array(
-                'font' => array(
+            'h3'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 13.5,
-                )
-            ),
+                ],
+            ],
 
             /*
              |--------------------------------------------------------------------------
              | Heading 4
              |--------------------------------------------------------------------------
              */
-            'h4'     => array(
-                'font' => array(
+            'h4'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 12,
-                )
-            ),
+                ],
+            ],
 
             /*
              |--------------------------------------------------------------------------
              | Heading 5
              |--------------------------------------------------------------------------
              */
-            'h5'     => array(
-                'font' => array(
+            'h5'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 10,
-                )
-            ),
+                ],
+            ],
 
             /*
              |--------------------------------------------------------------------------
              | Heading 6
              |--------------------------------------------------------------------------
              */
-            'h6'     => array(
-                'font' => array(
+            'h6'     => [
+                'font' => [
                     'bold' => true,
                     'size' => 7.5,
-                )
-            ),
+                ],
+            ],
 
             /*
              |--------------------------------------------------------------------------
              | Hyperlinks
              |--------------------------------------------------------------------------
              */
-            'a'      => array(
-                'font' => array(
+            'a'      => [
+                'font' => [
                     'underline' => true,
-                    'color'     => array('argb' => 'FF0000FF'),
-                )
-            ),
+                    'color'     => ['argb' => 'FF0000FF'],
+                ],
+            ],
 
             /*
              |--------------------------------------------------------------------------
              | Horizontal rules
              |--------------------------------------------------------------------------
              */
-            'hr'     => array(
-                'borders' => array(
-                    'bottom' => array(
+            'hr'     => [
+                'borders' => [
+                    'bottom' => [
                         'style' => 'thin',
-                        'color' => array('FF000000')
-                    ),
-                )
-            )
-        )
+                        'color' => ['FF000000'],
+                    ],
+                ],
+            ],
+        ],
 
-    )
+    ],
 
-);
+];
diff --git a/docs/reference-guide/closures.md b/docs/reference-guide/closures.md
index 8719d3f2f..3459a1c66 100644
--- a/docs/reference-guide/closures.md
+++ b/docs/reference-guide/closures.md
@@ -2,9 +2,9 @@
 
 | Method  | Closure class |
 | ------------- |-------------|
-| create()      | Maatwebsite\Excel\Writers\LaravelExcelWriter |
-| load()     | Maatwebsite\Excel\Readers\LaravelExcelReader    |
-| batch | Maatwebsite\Excel\Readers\Batch     |
-| sheet() | Maatwebsite\Excel\Classes\LaravelExcelWorksheet     |
-| cells() | Maatwebsite\Excel\Writers\CellWriter     |
-| row() | Maatwebsite\Excel\Writers\CellWriter    |
\ No newline at end of file
+| create()      | Maatwebsite\Excel\Drivers\PHPExcel\Writers\LaravelExcelWriter |
+| load()     | Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaravelExcelReader    |
+| batch | Maatwebsite\Excel\Drivers\PHPExcel\Readers\Batch     |
+| sheet() | Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet     |
+| cells() | Maatwebsite\Excel\Drivers\PHPExcel\Writers\CellWriter     |
+| row() | Maatwebsite\Excel\Drivers\PHPExcel\Writers\CellWriter    |
\ No newline at end of file
diff --git a/src/Maatwebsite/Excel/Classes/Cache.php b/src/Drivers/PHPExcel/Classes/Cache.php
similarity index 71%
rename from src/Maatwebsite/Excel/Classes/Cache.php
rename to src/Drivers/PHPExcel/Classes/Cache.php
index df69eb4d0..ff254d504 100644
--- a/src/Maatwebsite/Excel/Classes/Cache.php
+++ b/src/Drivers/PHPExcel/Classes/Cache.php
@@ -1,22 +1,24 @@
- 'cache_in_memory',
         'gzip'       => 'cache_in_memory_gzip',
         'serialized' => 'cache_in_memory_serialized',
@@ -27,32 +29,32 @@ class Cache {
         'temp'       => 'cache_to_phpTemp',
         'wincache'   => 'cache_to_wincache',
         'sqlite'     => 'cache_to_sqlite',
-        'sqlite3'    => 'cache_to_sqlite3'
-    );
+        'sqlite3'    => 'cache_to_sqlite3',
+    ];
 
     /**
-     * The name of the config file
+     * The name of the config file.
      * @var string
      */
     private $configName = 'excel.cache';
 
     /**
-     * Cache constructor
+     * Cache constructor.
      */
     public function __construct()
     {
         // Get driver and settings from the config
-        $this->driver = Config::get($this->configName . '.driver', 'memory');
-        $this->settings = Config::get($this->configName . '.settings', array());
+        $this->driver   = Config::get($this->configName . '.driver', 'memory');
+        $this->settings = Config::get($this->configName . '.settings', []);
 
         // Init if caching is enabled
-        if ($this->isEnabled())
+        if ($this->isEnabled()) {
             $this->init();
+        }
     }
 
     /**
-     * Init the cache
-     * @return void
+     * Init the cache.
      */
     public function init()
     {
@@ -64,17 +66,16 @@ public function init()
     }
 
     /**
-     * Set the right driver
-     * @return void
+     * Set the right driver.
      */
     public function findDriver()
     {
-        $property = $this->detect();
+        $property     = $this->detect();
         $this->method = constant($this->class . '::' . $property);
     }
 
     /**
-     * Detect the caching driver
+     * Detect the caching driver.
      * @return string $driver
      */
     protected function detect()
@@ -87,40 +88,38 @@ protected function detect()
     }
 
     /**
-     * Add additional settings for the current driver
-     * @return  void
+     * Add additional settings for the current driver.
      */
     protected function addAdditionalSettings()
     {
-        switch ($this->driver)
-        {
+        switch ($this->driver) {
             case 'memcache':
 
                 // Add extra memcache settings
-                $this->settings = array_merge($this->settings, array(
+                $this->settings = array_merge($this->settings, [
                     'memcacheServer' => Config::get($this->configName . '.memcache.host', 'localhost'),
-                    'memcachePort'   => Config::get($this->configName . '.memcache.port', 11211)
-                ));
+                    'memcachePort'   => Config::get($this->configName . '.memcache.port', 11211),
+                ]);
 
                 break;
 
             case 'discISAM':
 
                 // Add dir
-                $this->settings = array_merge($this->settings, array(
+                $this->settings = array_merge($this->settings, [
                     'dir' => Config::get($this->configName . '.dir', storage_path('cache')),
-                ));
+                ]);
 
                 break;
         }
     }
 
     /**
-     * Check if caching is enabled
-     * @return boolean
+     * Check if caching is enabled.
+     * @return bool
      */
     public function isEnabled()
     {
         return Config::get($this->configName . '.enable', true) ? true : false;
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Classes/FormatIdentifier.php b/src/Drivers/PHPExcel/Classes/FormatIdentifier.php
similarity index 88%
rename from src/Maatwebsite/Excel/Classes/FormatIdentifier.php
rename to src/Drivers/PHPExcel/Classes/FormatIdentifier.php
index 99299a1c3..baf0a0294 100644
--- a/src/Maatwebsite/Excel/Classes/FormatIdentifier.php
+++ b/src/Drivers/PHPExcel/Classes/FormatIdentifier.php
@@ -1,18 +1,20 @@
-getFormatByExtension($ext);
 
         // Check if the file can be read
-        if ($this->canRead($format, $file))
+        if ($this->canRead($format, $file)) {
             return $format;
+        }
 
         // Do a last try to init the file with all available readers
         return $this->lastResort($file, $format, $ext);
     }
 
     /**
-     * Identify file format
+     * Identify file format.
      * @param $ext
-     * @return  string $format
+     * @return string $format
      */
     public function getFormatByExtension($ext)
     {
-        switch ($ext)
-        {
+        switch ($ext) {
 
             /*
             |--------------------------------------------------------------------------
@@ -156,14 +158,13 @@ public function getFormatByExtension($ext)
     }
 
     /**
-     * Get the content type by file format
+     * Get the content type by file format.
      * @param  string $format
      * @return string $contentType
      */
     public function getContentTypeByFormat($format)
     {
-        switch ($format)
-        {
+        switch ($format) {
 
             /*
             |--------------------------------------------------------------------------
@@ -213,21 +214,21 @@ public function getContentTypeByFormat($format)
     }
 
     /**
-     * Try every reader we have
-     * @param        $file
-     * @param bool   $wrongFormat
-     * @param string $ext
+     * Try every reader we have.
+     * @param                        $file
+     * @param  bool                  $wrongFormat
+     * @param  string                $ext
      * @throws LaravelExcelException
-     * @return string $format
+     * @return string                $format
      */
     protected function lastResort($file, $wrongFormat = false, $ext = 'xls')
     {
         // Loop through all available formats
-        foreach ($this->formats as $format)
-        {
+        foreach ($this->formats as $format) {
             // Check if the file could be read
-            if ($wrongFormat != $format && $this->canRead($format, $file))
+            if ($wrongFormat != $format && $this->canRead($format, $file)) {
                 return $format;
+            }
         }
 
         // Give up searching and throw an exception
@@ -235,15 +236,14 @@ protected function lastResort($file, $wrongFormat = false, $ext = 'xls')
     }
 
     /**
-     * Check if we can read the file
+     * Check if we can read the file.
      * @param $format
      * @param $file
-     * @return boolean
+     * @return bool
      */
     protected function canRead($format, $file)
     {
-        if ($format)
-        {
+        if ($format) {
             $reader = $this->initReader($format);
 
             return $reader && $reader->canRead($file);
@@ -253,8 +253,8 @@ protected function canRead($format, $file)
     }
 
     /**
-     * Init the reader based on the format
-     * @param  string $format
+     * Init the reader based on the format.
+     * @param  string                   $format
      * @return \PHPExcel_Reader_IReader
      */
     protected function initReader($format)
@@ -263,7 +263,7 @@ protected function initReader($format)
     }
 
     /**
-     * Get the file extension
+     * Get the file extension.
      * @param  string $file
      * @return string
      */
@@ -271,4 +271,4 @@ protected function getExtension($file)
     {
         return strtolower($this->filesystem->extension($file));
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php b/src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php
similarity index 64%
rename from src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
rename to src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php
index 1d219bc63..6b8037c59 100644
--- a/src/Maatwebsite/Excel/Classes/LaravelExcelWorksheet.php
+++ b/src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php
@@ -1,18 +1,19 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class LaravelExcelWorksheet extends PHPExcel_Worksheet {
-
+class LaravelExcelWorksheet extends PHPExcel_Worksheet
+{
     /**
-     * Parent
+     * Parent.
      * @var PHPExcel
      */
     public $_parent;
 
     /**
-     * Parser
+     * Parser.
      * @var ViewParser
      */
     protected $parser;
 
     /**
-     * View
+     * View.
      * @var string
      */
     public $view;
 
     /**
-     * Data
+     * Data.
      * @var array
      */
-    public $data = array();
+    public $data = [];
 
     /**
-     * Merge data
+     * Merge data.
      * @var array
      */
-    public $mergeData = array();
+    public $mergeData = [];
 
     /**
-     * Allowed page setup
+     * Allowed page setup.
      * @var array
      */
-    public $allowedPageSetup = array(
+    public $allowedPageSetup = [
         'orientation',
         'paperSize',
         'scale',
@@ -70,27 +71,27 @@ class LaravelExcelWorksheet extends PHPExcel_Worksheet {
         'horizontalCentered',
         'verticalCentered',
         'printArea',
-        'firstPageNumber'
-    );
+        'firstPageNumber',
+    ];
 
     /**
-     * Allowed page setup
+     * Allowed page setup.
      * @var array
      */
-    public $allowedStyles = array(
+    public $allowedStyles = [
         'fontFamily',
         'fontSize',
-        'fontBold'
-    );
+        'fontBold',
+    ];
 
     /**
-     * Check if the file was autosized
-     * @var boolean
+     * Check if the file was autosized.
+     * @var bool
      */
     public $hasFixedSizeColumns = false;
 
     /**
-     * Auto generate table heading
+     * Auto generate table heading.
      * @var [type]
      */
     protected $autoGenerateHeading = true;
@@ -101,7 +102,7 @@ class LaravelExcelWorksheet extends PHPExcel_Worksheet {
     protected $hasRowsAdded = false;
 
     /**
-     * Create a new worksheet
+     * Create a new worksheet.
      *
      * @param PHPExcel $pParent
      * @param string   $pTitle
@@ -116,16 +117,14 @@ public function __construct(PHPExcel $pParent = null, $pTitle = 'Worksheet')
     }
 
     /**
-     * Set default page setup
-     * @return  void
+     * Set default page setup.
      */
     public function setDefaultPageSetup()
     {
         // Get the page setup
         $pageSetup = $this->getPageSetup();
 
-        foreach ($this->allowedPageSetup as $setup)
-        {
+        foreach ($this->allowedPageSetup as $setup) {
             // set the setter
             list($setter, $set) = $this->_setSetter($setup);
 
@@ -133,8 +132,9 @@ public function setDefaultPageSetup()
             $value = Config::get('excel.sheets.pageSetup.' . $setup, null);
 
             // Set the page setup value
-            if (!is_null($value))
-                call_user_func_array(array($pageSetup, $setter), array($value));
+            if (!is_null($value)) {
+                call_user_func_array([$pageSetup, $setter], [$value]);
+            }
         }
 
         // Set default page margins
@@ -142,64 +142,62 @@ public function setDefaultPageSetup()
     }
 
     /**
-     * Set the page margin
-     * @param array|boolean|integer|float $margin
+     * Set the page margin.
+     * @param array|bool|int|float $margin
      */
     public function setPageMargin($margin = false)
     {
-        if (!is_array($margin))
-        {
-            $marginArray = array($margin, $margin, $margin, $margin);
-        }
-        else
-        {
+        if (!is_array($margin)) {
+            $marginArray = [$margin, $margin, $margin, $margin];
+        } else {
             $marginArray = $margin;
         }
 
         // Get margin
         $pageMargin = $this->getPageMargins();
 
-        if (isset($marginArray[0]))
+        if (isset($marginArray[0])) {
             $pageMargin->setTop($marginArray[0]);
+        }
 
-        if (isset($marginArray[1]))
+        if (isset($marginArray[1])) {
             $pageMargin->setRight($marginArray[1]);
+        }
 
-        if (isset($marginArray[2]))
+        if (isset($marginArray[2])) {
             $pageMargin->setBottom($marginArray[2]);
+        }
 
-        if (isset($marginArray[3]))
+        if (isset($marginArray[3])) {
             $pageMargin->setLeft($marginArray[3]);
+        }
     }
 
     /**
-     * Manipulate a single row
-     * @param  integer|callback|array $rowNumber
-     * @param  array|callback         $callback
-     * @param  boolean                $explicit
+     * Manipulate a single row.
+     * @param  int|callback|array    $rowNumber
+     * @param  array|callback        $callback
+     * @param  bool                  $explicit
      * @return LaravelExcelWorksheet
      */
     public function row($rowNumber, $callback = null, $explicit = false)
     {
         // If a callback is given, handle it with the cell writer
-        if ($callback instanceof Closure)
-        {
+        if ($callback instanceof Closure) {
             $range = $this->rowToRange($rowNumber);
 
             return $this->cells($range, $callback);
         }
 
         // Else if the 2nd param was set, we will use it as a cell value
-        if (is_array($callback))
-        {
+        if (is_array($callback)) {
             // Interpret the callback as cell values
             $values = $callback;
 
             // Set start column
             $column = 'A';
 
-            foreach ($values as $rowValue)
-            {
+            foreach ($values as $rowValue) {
                 // Set cell coordinate
                 $cell = $column . $rowNumber;
 
@@ -220,19 +218,18 @@ public function row($rowNumber, $callback = null, $explicit = false)
     }
 
     /**
-     * Add multiple rows
-     * @param  array $rows
-     * @param  boolean $explicit
+     * Add multiple rows.
+     * @param  array                 $rows
+     * @param  bool                  $explicit
      * @return LaravelExcelWorksheet
      */
-    public function rows($rows = array(), $explicit = false)
+    public function rows($rows = [], $explicit = false)
     {
         // Get the start row
         $startRow = $this->getStartRow();
 
         // Add rows
-        foreach ($rows as $row)
-        {
+        foreach ($rows as $row) {
             $this->row($startRow, $row, $explicit);
             $startRow++;
         }
@@ -241,18 +238,17 @@ public function rows($rows = array(), $explicit = false)
     }
 
     /**
-     * Prepend a row
-     * @param  integer        $rowNumber
-     * @param  array|callback $callback
-     * @param  boolean        $explicit
+     * Prepend a row.
+     * @param  int                   $rowNumber
+     * @param  array|callback        $callback
+     * @param  bool                  $explicit
      * @return LaravelExcelWorksheet
      */
     public function prependRow($rowNumber = 1, $callback = null, $explicit = false)
     {
         // If only one param was given, prepend it before the first row
-        if (is_null($callback))
-        {
-            $callback = $rowNumber;
+        if (is_null($callback)) {
+            $callback  = $rowNumber;
             $rowNumber = 1;
         }
 
@@ -264,9 +260,9 @@ public function prependRow($rowNumber = 1, $callback = null, $explicit = false)
     }
 
     /**
-     * Prepend a row explicitly
-     * @param  integer        $rowNumber
-     * @param  array|callback $callback
+     * Prepend a row explicitly.
+     * @param  int                   $rowNumber
+     * @param  array|callback        $callback
      * @return LaravelExcelWorksheet
      */
     public function prependRowExplicit($rowNumber = 1, $callback = null)
@@ -275,18 +271,17 @@ public function prependRowExplicit($rowNumber = 1, $callback = null)
     }
 
     /**
-     * Append a row
-     * @param  integer|callback $rowNumber
-     * @param  array|callback   $callback
-     * @param  boolean          $explicit
+     * Append a row.
+     * @param  int|callback          $rowNumber
+     * @param  array|callback        $callback
+     * @param  bool                  $explicit
      * @return LaravelExcelWorksheet
      */
     public function appendRow($rowNumber = 1, $callback = null, $explicit = false)
     {
         // If only one param was given, add it as very last
-        if (is_null($callback))
-        {
-            $callback = $rowNumber;
+        if (is_null($callback)) {
+            $callback  = $rowNumber;
             $rowNumber = $this->getStartRow();
         }
 
@@ -295,9 +290,9 @@ public function appendRow($rowNumber = 1, $callback = null, $explicit = false)
     }
 
     /**
-     * Append a row explicitly
-     * @param  integer|callback $rowNumber
-     * @param  array|callback   $callback
+     * Append a row explicitly.
+     * @param  int|callback          $rowNumber
+     * @param  array|callback        $callback
      * @return LaravelExcelWorksheet
      */
     public function appendRowExplicit($rowNumber = 1, $callback = null)
@@ -306,17 +301,18 @@ public function appendRowExplicit($rowNumber = 1, $callback = null)
     }
 
     /**
-     * Manipulate a single cell
-     * @param  array|string $cell
-     * @param bool|callable $callback $callback
-     * @param       boolean $explicit
+     * Manipulate a single cell.
+     * @param  array|string          $cell
+     * @param  bool|callable         $callback $callback
+     * @param  bool                  $explicit
      * @return LaravelExcelWorksheet
      */
     public function cell($cell, $callback = false, $explicit = false)
     {
         // If a callback is given, handle it with the cell writer
-        if ($callback instanceof Closure)
+        if ($callback instanceof Closure) {
             return $this->cells($cell, $callback);
+        }
 
         // Else if the 2nd param was set, we will use it as a cell value
         if ($callback) {
@@ -331,9 +327,9 @@ public function cell($cell, $callback = false, $explicit = false)
     }
 
     /**
-     * Manipulate a cell or a range of cells
-     * @param  array        $cells
-     * @param bool|callable $callback $callback
+     * Manipulate a cell or a range of cells.
+     * @param  array                 $cells
+     * @param  bool|callable         $callback $callback
      * @return LaravelExcelWorksheet
      */
     public function cells($cells, $callback = false)
@@ -342,33 +338,35 @@ public function cells($cells, $callback = false)
         $cells = new CellWriter($cells, $this);
 
         // Do the callback
-        if ($callback instanceof Closure)
+        if ($callback instanceof Closure) {
             call_user_func($callback, $cells);
+        }
 
         return $this;
     }
 
     /**
-     *  Load a View and convert to HTML
+     *  Load a View and convert to HTML.
      * @return LaravelExcelWorksheet
      */
     public function setView()
     {
-        return call_user_func_array(array($this, 'loadView'), func_get_args());
+        return call_user_func_array([$this, 'loadView'], func_get_args());
     }
 
     /**
-     *  Load a View and convert to HTML
-     * @param string $view
-     * @param array  $data
-     * @param array  $mergeData
+     *  Load a View and convert to HTML.
+     * @param  string                $view
+     * @param  array                 $data
+     * @param  array                 $mergeData
      * @return LaravelExcelWorksheet
      */
-    public function loadView($view, $data = array(), $mergeData = array())
+    public function loadView($view, $data = [], $mergeData = [])
     {
         // Init the parser
-        if (!$this->parser)
+        if (!$this->parser) {
             $this->setParser();
+        }
 
         $this->parser->setView($view);
         $this->parser->setData($data);
@@ -378,7 +376,7 @@ public function loadView($view, $data = array(), $mergeData = array())
     }
 
     /**
-     * Unset the view
+     * Unset the view.
      * @return LaravelExcelWorksheet
      */
     public function unsetView()
@@ -389,8 +387,8 @@ public function unsetView()
     }
 
     /**
-     * Set the parser
-     * @param boolean $parser
+     * Set the parser.
+     * @param  bool       $parser
      * @return ViewParser
      */
     public function setParser($parser = false)
@@ -399,7 +397,7 @@ public function setParser($parser = false)
     }
 
     /**
-     * Get the view
+     * Get the view.
      * @return ViewParser
      */
     public function getView()
@@ -408,24 +406,25 @@ public function getView()
     }
 
     /**
-     * Return parsed sheet
+     * Return parsed sheet.
      * @return LaravelExcelWorksheet
      */
     public function parsed()
     {
         // If parser is set, use it
-        if ($this->parser)
+        if ($this->parser) {
             return $this->parser->parse($this);
+        }
 
         // Else return the entire sheet
         return $this;
     }
 
     /**
-     * Set data for the current sheet
-     * @param              $key
-     * @param  bool|string $value
-     * @param  boolean     $headingGeneration
+     * Set data for the current sheet.
+     * @param                        $key
+     * @param  bool|string           $value
+     * @param  bool                  $headingGeneration
      * @return LaravelExcelWorksheet
      */
     public function with($key, $value = false, $headingGeneration = true)
@@ -440,12 +439,12 @@ public function with($key, $value = false, $headingGeneration = true)
     }
 
     /**
-     * From array
-     * @param  Collection|array $source
-     * @param null              $nullValue
-     * @param bool|string       $startCell
-     * @param bool              $strictNullComparison
-     * @param boolean           $headingGeneration
+     * From array.
+     * @param  Collection|array      $source
+     * @param  null                  $nullValue
+     * @param  bool|string           $startCell
+     * @param  bool                  $strictNullComparison
+     * @param  bool                  $headingGeneration
      * @return LaravelExcelWorksheet
      */
     public function fromModel($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false, $headingGeneration = true)
@@ -454,21 +453,21 @@ public function fromModel($source = null, $nullValue = null, $startCell = 'A1',
     }
 
     /**
-     * Fill worksheet from values in array
+     * Fill worksheet from values in array.
      *
-     * @param array       $source               Source array
-     * @param mixed       $nullValue            Value in source array that stands for blank cell
-     * @param bool|string $startCell            Insert array starting from this cell address as the top left coordinate
-     * @param boolean     $strictNullComparison Apply strict comparison when testing for null values in the array
-     * @param bool        $headingGeneration
+     * @param  array                 $source               Source array
+     * @param  mixed                 $nullValue            Value in source array that stands for blank cell
+     * @param  bool|string           $startCell            Insert array starting from this cell address as the top left coordinate
+     * @param  bool                  $strictNullComparison Apply strict comparison when testing for null values in the array
+     * @param  bool                  $headingGeneration
      * @throws PHPExcel_Exception
      * @return LaravelExcelWorksheet
      */
     public function fromArray($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false, $headingGeneration = true)
     {
         // Set defaults
-        $nullValue = !is_null($nullValue) ? $nullValue : $this->getDefaultNullValue();
-        $startCell = $startCell ? $startCell : $this->getDefaultStartCell();
+        $nullValue            = !is_null($nullValue) ? $nullValue : $this->getDefaultNullValue();
+        $startCell            = $startCell ? $startCell : $this->getDefaultStartCell();
         $strictNullComparison = $strictNullComparison ? $strictNullComparison : $this->getDefaultStrictNullComparison();
 
         // Set the heading generation setting
@@ -481,45 +480,36 @@ public function fromArray($source = null, $nullValue = null, $startCell = 'A1',
     }
 
     /**
-     * Create sheet from array
-     * @param null        $source
-     * @param null        $nullValue
-     * @param bool|string $startCell
-     * @param bool        $strictNullComparison
+     * Create sheet from array.
+     * @param  null               $source
+     * @param  null               $nullValue
+     * @param  bool|string        $startCell
+     * @param  bool               $strictNullComparison
      * @throws PHPExcel_Exception
      * @return $this
      */
     public function createSheetFromArray($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false)
     {
-        if (is_array($source))
-        {
+        if (is_array($source)) {
             //    Convert a 1-D array to 2-D (for ease of looping)
-            if (!is_array(end($source)))
-            {
-                $source = array($source);
+            if (!is_array(end($source))) {
+                $source = [$source];
             }
 
             // start coordinate
-            list ($startColumn, $startRow) = PHPExcel_Cell::coordinateFromString($startCell);
+            list($startColumn, $startRow) = PHPExcel_Cell::coordinateFromString($startCell);
 
             // Loop through $source
-            foreach ($source as $rowData)
-            {
+            foreach ($source as $rowData) {
                 $currentColumn = $startColumn;
-                foreach ($rowData as $cellValue)
-                {
-                    if ($strictNullComparison)
-                    {
-                        if ($cellValue !== $nullValue)
-                        {
+                foreach ($rowData as $cellValue) {
+                    if ($strictNullComparison) {
+                        if ($cellValue !== $nullValue) {
                             // Set cell value
                             $this->setValueOfCell($cellValue, $currentColumn, $startRow);
                         }
-                    }
-                    else
-                    {
-                        if ($cellValue != $nullValue)
-                        {
+                    } else {
+                        if ($cellValue != $nullValue) {
                             // Set cell value
                             $this->setValueOfCell($cellValue, $currentColumn, $startRow);
                         }
@@ -528,9 +518,7 @@ public function createSheetFromArray($source = null, $nullValue = null, $startCe
                 }
                 ++$startRow;
             }
-        }
-        else
-        {
+        } else {
             throw new PHPExcel_Exception("Parameter \$source should be an array.");
         }
 
@@ -538,95 +526,83 @@ public function createSheetFromArray($source = null, $nullValue = null, $startCe
     }
 
     /**
-     * Add vars to the data array
-     * @param string      $key
-     * @param bool|string $value
-     * @param null        $nullValue
-     * @param bool|string $startCell
-     * @param bool        $strictNullComparison
+     * Add vars to the data array.
+     * @param  string             $key
+     * @param  bool|string        $value
+     * @param  null               $nullValue
+     * @param  bool|string        $startCell
+     * @param  bool               $strictNullComparison
      * @throws PHPExcel_Exception
      * @return void|$this
      */
     protected function _addVars($key, $value = false, $nullValue = null, $startCell = 'A1', $strictNullComparison = false)
     {
         // Add array of data
-        if (is_array($key) || $key instanceof Collection)
-        {
+        if (is_array($key) || $key instanceof Collection) {
             // Set the data
             $this->data = $this->addData($key);
 
             // Create excel from array without a view
-            if (!$this->parser)
-            {
+            if (!$this->parser) {
                 return $this->createSheetFromArray($this->data, $nullValue, $startCell, $strictNullComparison);
             }
         }
 
         // Add seperate values
-        else
-        {
+        else {
             $this->data[$key] = $value;
         }
 
         // Set data to parser
-        if ($this->parser)
+        if ($this->parser) {
             $this->parser->setData($this->data);
+        }
     }
 
     /**
-     * Add data
-     * @param array $array
-     * @return  array
+     * Add data.
+     * @param  array $array
+     * @return array
      */
     protected function addData($array)
     {
         // If a parser was set
-        if ($this->parser)
-        {
+        if ($this->parser) {
             // Don't change anything
             $data = $array;
-        }
-        else
-        {
+        } else {
             // Transform model/collection to array
-            if ($array instanceof Collection)
+            if ($array instanceof Collection) {
                 $array = $array->toArray();
+            }
 
             // Get the firstRow
             $firstRow = reset($array);
 
             // Check if the array has array values
-            if (count($firstRow) != count($firstRow, 1))
-            {
+            if (count($firstRow) != count($firstRow, 1)) {
                 // Loop through the data to remove arrays
-                $data = array();
-                $r = 0;
-                foreach ($array as $row)
-                {
-                    $data[$r] = array();
-                    foreach ($row as $key => $cell)
-                    {
-                        if (!is_array($cell))
-                        {
+                $data = [];
+                $r    = 0;
+                foreach ($array as $row) {
+                    $data[$r] = [];
+                    foreach ($row as $key => $cell) {
+                        if (!is_array($cell)) {
                             $data[$r][$key] = $cell;
                         }
                     }
                     $r++;
                 }
-            }
-            else
-            {
+            } else {
                 $data = $array;
             }
 
             // Check if we should auto add the first row based on the indices
-            if ($this->generateHeadingByIndices())
-            {
+            if ($this->generateHeadingByIndices()) {
                 // Get the first row
                 $firstRow = reset($data);
 
-                if (is_array($firstRow))
-                {
+                if (is_array($firstRow)) {
                     // Get the array keys
                     $tableHeading = array_keys($firstRow);
 
@@ -637,16 +613,17 @@ protected function addData($array)
         }
 
         // Add results
-        if (!empty($data))
+        if (!empty($data)) {
             $this->data = !empty($this->data) ? array_merge($this->data, $data) : $data;
+        }
 
         // return data
         return $this->data;
     }
 
     /**
-     * Set the auto heading generation setting
-     * @param boolean $boolean
+     * Set the auto heading generation setting.
+     * @param  bool                  $boolean
      * @return LaravelExcelWorksheet
      */
     public function setAutoHeadingGeneration($boolean)
@@ -657,8 +634,8 @@ public function setAutoHeadingGeneration($boolean)
     }
 
     /**
-     * Disable the heading generation
-     * @param  boolean $boolean
+     * Disable the heading generation.
+     * @param  bool                  $boolean
      * @return LaravelExcelWorksheet
      */
     public function disableHeadingGeneration($boolean = false)
@@ -669,8 +646,8 @@ public function disableHeadingGeneration($boolean = false)
     }
 
     /**
-     * Check if we should auto generate the table heading
-     * @return boolean
+     * Check if we should auto generate the table heading.
+     * @return bool
      */
     protected function generateHeadingByIndices()
     {
@@ -678,11 +655,11 @@ protected function generateHeadingByIndices()
     }
 
     /**
-     * Set attributes
-     * @param              $setter
-     * @param array|string $params
+     * Set attributes.
+     * @param                                    $setter
+     * @param  array|string                      $params
      * @throws LaravelExcelException
-     * @return  void|PHPExcel_Worksheet_PageSetup
+     * @return void|PHPExcel_Worksheet_PageSetup
      */
     public function _setAttributes($setter, $params)
     {
@@ -690,48 +667,45 @@ public function _setAttributes($setter, $params)
         list($setter, $key) = $this->_setSetter($setter);
 
         // If is page setup
-        if (in_array($key, $this->allowedPageSetup))
-        {
+        if (in_array($key, $this->allowedPageSetup)) {
             // Set params
-            $params = is_array($params) ? $params : array($params);
+            $params = is_array($params) ? $params : [$params];
 
             // Call the setter
-            return call_user_func_array(array($this->getPageSetup(), $setter), $params);
+            return call_user_func_array([$this->getPageSetup(), $setter], $params);
         }
 
         // If is a style
-        elseif (in_array($key, $this->allowedStyles))
-        {
-           return $this->setDefaultStyles($setter, $key, $params);
-        }
-        else
-        {
+        elseif (in_array($key, $this->allowedStyles)) {
+            return $this->setDefaultStyles($setter, $key, $params);
+        } else {
             throw new LaravelExcelException('[ERROR] Laravel Worksheet method [' . $setter . '] does not exist.');
         }
     }
 
     /**
-     * Set default styles
-     * @param string       $setter
-     * @param string       $key
-     * @param array|string $params
+     * Set default styles.
+     * @param  string         $setter
+     * @param  string         $key
+     * @param  array|string   $params
      * @return PHPExcel_Style
      */
     protected function setDefaultStyles($setter, $key, $params)
     {
         $caller = $this->getDefaultStyle();
-        $params = is_array($params) ? $params : array($params);
+        $params = is_array($params) ? $params : [$params];
 
-        if (str_contains($key, 'font'))
+        if (str_contains($key, 'font')) {
             return $this->setFontStyle($caller, $setter, $key, $params);
+        }
 
-        return call_user_func_array(array($caller, $setter), $params);
+        return call_user_func_array([$caller, $setter], $params);
     }
 
     /**
-     * Set default styles by array
-     * @param array $styles
-     * @return  LaravelExcelWorksheet
+     * Set default styles by array.
+     * @param  array                 $styles
+     * @return LaravelExcelWorksheet
      */
     public function setStyle($styles)
     {
@@ -741,14 +715,13 @@ public function setStyle($styles)
     }
 
     /**
-     * Set the font
-     * @param  array $fonts
+     * Set the font.
+     * @param  array                 $fonts
      * @return LaravelExcelWorksheet
      */
     public function setFont($fonts)
     {
-        foreach ($fonts as $key => $value)
-        {
+        foreach ($fonts as $key => $value) {
             $this->setFontStyle($this->getDefaultStyle(), $key, $key, $value);
         }
 
@@ -756,17 +729,17 @@ public function setFont($fonts)
     }
 
     /**
-     * Set default font styles
-     * @param string       $caller
-     * @param string       $key
-     * @param array|string $params
-     * @return  PHPExcel_Style
+     * Set default font styles.
+     * @param  string         $caller
+     * @param  string         $key
+     * @param  array|string   $params
+     * @return PHPExcel_Style
      */
     protected function setFontStyle($caller, $setter, $key, $params)
     {
         // Set caller to font
         $caller = $caller->getFont();
-        $params = is_array($params) ? $params : array($params);
+        $params = is_array($params) ? $params : [$params];
 
         // Clean the setter name
         $setter = lcfirst(str_replace('Font', '', $setter));
@@ -774,32 +747,29 @@ protected function setFontStyle($caller, $setter, $key, $params)
         // Replace special cases
         $setter = str_replace('Family', 'Name', $setter);
 
-        return call_user_func_array(array($caller, $setter), $params);
+        return call_user_func_array([$caller, $setter], $params);
     }
 
     /**
-     * Set the setter
-     * @param string $setter
-     * @return  array
+     * Set the setter.
+     * @param  string $setter
+     * @return array
      */
     protected function _setSetter($setter)
     {
-        if (starts_with($setter, 'set'))
-        {
+        if (starts_with($setter, 'set')) {
             $key = lcfirst(str_replace('set', '', $setter));
-        }
-        else
-        {
-            $key = $setter;
+        } else {
+            $key    = $setter;
             $setter = 'set' . ucfirst($key);
         }
 
         // Return the setter method and the key
-        return array($setter, $key);
+        return [$setter, $key];
     }
 
     /**
-     * Set the parent (excel object)
+     * Set the parent (excel object).
      * @param PHPExcel $parent
      */
     public function setParent($parent)
@@ -808,7 +778,7 @@ public function setParent($parent)
     }
 
     /**
-     * Get the parent excel obj
+     * Get the parent excel obj.
      * @return PHPExcel
      */
     public function getParent()
@@ -817,24 +787,20 @@ public function getParent()
     }
 
     /**
-     * Set the column width
-     * @param string|array $column
-     * @param boolean      $value
-     * @return  LaravelExcelWorksheet
+     * Set the column width.
+     * @param  string|array          $column
+     * @param  bool                  $value
+     * @return LaravelExcelWorksheet
      */
     public function setWidth($column, $value = false)
     {
         // if is array of columns
-        if (is_array($column))
-        {
+        if (is_array($column)) {
             // Set width for each column
-            foreach ($column as $subColumn => $subValue)
-            {
+            foreach ($column as $subColumn => $subValue) {
                 $this->setWidth($subColumn, $subValue);
             }
-        }
-        else
-        {
+        } else {
             // Disable the autosize and set column width
             $this->getColumnDimension($column)
                 ->setAutoSize(false)
@@ -848,24 +814,20 @@ public function setWidth($column, $value = false)
     }
 
     /**
-     * Set the row height
-     * @param integer|array $row
-     * @param boolean       $value
-     * @return  LaravelExcelWorksheet
+     * Set the row height.
+     * @param  int|array             $row
+     * @param  bool                  $value
+     * @return LaravelExcelWorksheet
      */
     public function setHeight($row, $value = false)
     {
         // if is array of columns
-        if (is_array($row))
-        {
+        if (is_array($row)) {
             // Set width for each column
-            foreach ($row as $subRow => $subValue)
-            {
+            foreach ($row as $subRow => $subValue) {
                 $this->setHeight($subRow, $subValue);
             }
-        }
-        else
-        {
+        } else {
             // Set column width
             $this->getRowDimension($row)->setRowHeight($value);
         }
@@ -874,42 +836,39 @@ public function setHeight($row, $value = false)
     }
 
     /**
-     * Set cell size
-     * @param array|string $cell
-     * @param bool         $width
-     * @param bool|int     $height
-     * @return  LaravelExcelWorksheet
+     * Set cell size.
+     * @param  array|string          $cell
+     * @param  bool                  $width
+     * @param  bool|int              $height
+     * @return LaravelExcelWorksheet
      */
     public function setSize($cell, $width = false, $height = false)
     {
         // if is array of columns
-        if (is_array($cell))
-        {
+        if (is_array($cell)) {
             // Set width for each column
-            foreach ($cell as $subCell => $sizes)
-            {
+            foreach ($cell as $subCell => $sizes) {
                 $this->setSize($subCell, reset($sizes), end($sizes));
             }
-        }
-        else
-        {
+        } else {
             // Split the cell to column and row
             list($column, $row) = preg_split('/(?<=[a-z])(?=[0-9]+)/i', $cell);
 
-            if ($column)
+            if ($column) {
                 $this->setWidth($column, $width);
+            }
 
-            if ($row)
+            if ($row) {
                 $this->setHeight($row, $height);
+            }
         }
 
         return $this;
     }
 
     /**
-     * Autosize column for document
-     * @param  array|boolean $columns
-     * @return void
+     * Autosize column for document.
+     * @param array|bool $columns
      */
     public function setAutoSize($columns = false)
     {
@@ -920,24 +879,20 @@ public function setAutoSize($columns = false)
         $this->autoSize = $columns ? $columns : false;
 
         // If is not an array
-        if (!is_array($columns) && $columns)
-        {
+        if (!is_array($columns) && $columns) {
             // Get the highest column
             $toCol = $this->getHighestColumn();
 
             // Lop through the columns and set the auto size
             $toCol++;
-            for ($i = 'A'; $i !== $toCol; $i++)
-            {
+            for ($i = 'A'; $i !== $toCol; $i++) {
                 $this->getColumnDimension($i)->setAutoSize(true);
             }
         }
 
         // Set autosize for the given columns
-        elseif (is_array($columns))
-        {
-            foreach ($columns as $column)
-            {
+        elseif (is_array($columns)) {
+            foreach ($columns as $column) {
                 $this->getColumnDimension($column)->setAutoSize(true);
             }
         }
@@ -949,20 +904,21 @@ public function setAutoSize($columns = false)
     }
 
     /**
-     * Get Auto size
+     * Get Auto size.
      * @return bool
      */
     public function getAutosize()
     {
-        if (isset($this->autoSize))
+        if (isset($this->autoSize)) {
             return $this->autoSize;
+        }
 
         return Config::get('excel.export.autosize', true);
     }
 
     /**
-     * Check if the sheet was auto sized dynamically
-     * @return boolean
+     * Check if the sheet was auto sized dynamically.
+     * @return bool
      */
     public function hasFixedSizeColumns()
     {
@@ -970,9 +926,9 @@ public function hasFixedSizeColumns()
     }
 
     /**
-     * Set the auto filter
-     * @param boolean $value
-     * @return  LaravelExcelWorksheet
+     * Set the auto filter.
+     * @param  bool                  $value
+     * @return LaravelExcelWorksheet
      */
     public function setAutoFilter($value = false)
     {
@@ -983,8 +939,8 @@ public function setAutoFilter($value = false)
     }
 
     /**
-     *  Freeze or lock rows and columns
-     * @param string $pane rows and columns
+     *  Freeze or lock rows and columns.
+     * @param  string                $pane rows and columns
      * @return LaravelExcelWorksheet
      */
     public function setFreeze($pane = 'A2')
@@ -995,8 +951,8 @@ public function setFreeze($pane = 'A2')
     }
 
     /**
-     * Freeze the first row
-     * @return  LaravelExcelWorksheet
+     * Freeze the first row.
+     * @return LaravelExcelWorksheet
      */
     public function freezeFirstRow()
     {
@@ -1006,8 +962,8 @@ public function freezeFirstRow()
     }
 
     /**
-     * Freeze the first column
-     * @return  LaravelExcelWorksheet
+     * Freeze the first column.
+     * @return LaravelExcelWorksheet
      */
     public function freezeFirstColumn()
     {
@@ -1017,8 +973,8 @@ public function freezeFirstColumn()
     }
 
     /**
-     * Freeze the first row and column
-     * @return  LaravelExcelWorksheet
+     * Freeze the first row and column.
+     * @return LaravelExcelWorksheet
      */
     public function freezeFirstRowAndColumn()
     {
@@ -1028,9 +984,9 @@ public function freezeFirstRowAndColumn()
     }
 
     /**
-     *  Set a range of cell borders
-     * @param string $pane   Start and end of the cell (A1:F10)
-     * @param string $weight Border style
+     *  Set a range of cell borders.
+     * @param  string                $pane   Start and end of the cell (A1:F10)
+     * @param  string                $weight Border style
      * @return LaravelExcelWorksheet
      */
     public function setBorder($pane = 'A1', $weight = 'thin')
@@ -1045,19 +1001,19 @@ public function setBorder($pane = 'A1', $weight = 'thin')
     }
 
     /**
-     *  Set all cell borders
-     * @param string $weight Border style (Reference setBorder style list)
+     *  Set all cell borders.
+     * @param  string                $weight Border style (Reference setBorder style list)
      * @return LaravelExcelWorksheet
      */
     public function setAllBorders($weight = 'thin')
     {
-        $styleArray = array(
-            'borders' => array(
-                'allborders' => array(
-                    'style' => $weight
-                )
-            )
-        );
+        $styleArray = [
+            'borders' => [
+                'allborders' => [
+                    'style' => $weight,
+                ],
+            ],
+        ];
 
         // Apply the style
         $this->getDefaultStyle()
@@ -1067,15 +1023,14 @@ public function setAllBorders($weight = 'thin')
     }
 
     /**
-     *  Set the cell format of the column
-     * @param array $formats An array of cells you want to format columns
+     *  Set the cell format of the column.
+     * @param  array                 $formats An array of cells you want to format columns
      * @return LaravelExcelWorksheet
      */
-    public function setColumnFormat(Array $formats)
+    public function setColumnFormat(array $formats)
     {
         // Loop through the columns
-        foreach ($formats as $column => $format)
-        {
+        foreach ($formats as $column => $format) {
             // Change the format for a specific cell or range
             $this->getStyle($column)
                 ->getNumberFormat()
@@ -1086,9 +1041,9 @@ public function setColumnFormat(Array $formats)
     }
 
     /**
-     * Merge cells
-     * @param  string $pRange
-     * @param bool    $alignment
+     * Merge cells.
+     * @param  string                $pRange
+     * @param  bool                  $alignment
      * @throws PHPExcel_Exception
      * @return LaravelExcelWorksheet
      */
@@ -1098,8 +1053,7 @@ public function mergeCells($pRange = 'A1:A1', $alignment = false)
         parent::mergeCells($pRange);
 
         // Set center alignment on merge cells
-        $this->cells($pRange, function ($cell) use ($alignment)
-        {
+        $this->cells($pRange, function ($cell) use ($alignment) {
             $aligment = is_string($alignment) ? $alignment : Config::get('excel.export.merged_cell_alignment', 'left');
             $cell->setAlignment($aligment);
         });
@@ -1108,17 +1062,15 @@ public function mergeCells($pRange = 'A1:A1', $alignment = false)
     }
 
     /**
-     *  Set the columns you want to merge
+     *  Set the columns you want to merge.
+     * @param  array                 $mergeColumn An array of columns you want to merge
+     * @param  bool                  $alignment
      * @return LaravelExcelWorksheet
-     * @param array $mergeColumn An array of columns you want to merge
-     * @param bool  $alignment
      */
-    public function setMergeColumn(Array $mergeColumn, $alignment = false)
+    public function setMergeColumn(array $mergeColumn, $alignment = false)
     {
-        foreach ($mergeColumn['columns'] as $column)
-        {
-            foreach ($mergeColumn['rows'] as $row)
-            {
+        foreach ($mergeColumn['columns'] as $column) {
+            foreach ($mergeColumn['rows'] as $row) {
                 $this->mergeCells($column . $row[0] . ":" . $column . $row[1], $alignment);
             }
         }
@@ -1127,7 +1079,7 @@ public function setMergeColumn(Array $mergeColumn, $alignment = false)
     }
 
     /**
-     * Password protect a sheet
+     * Password protect a sheet.
      * @param          $password
      * @param callable $callback
      */
@@ -1140,26 +1092,27 @@ public function protect($password, Closure $callback = null)
         $protection->setInsertRows(true);
         $protection->setFormatCells(true);
 
-        if(is_callable($callback)) {
+        if (is_callable($callback)) {
             call_user_func($callback, $protection);
         }
     }
 
     /**
-     * Return the start row
-     * @return integer
+     * Return the start row.
+     * @return int
      */
     protected function getStartRow()
     {
-        if ($this->getHighestRow() == 1 && !$this->hasRowsAdded)
+        if ($this->getHighestRow() == 1 && !$this->hasRowsAdded) {
             return 1;
+        }
 
         return $this->getHighestRow() + 1;
     }
 
     /**
-     * Return range from row
-     * @param  integer $rowNumber
+     * Return range from row.
+     * @param  int    $rowNumber
      * @return string $range
      */
     protected function rowToRange($rowNumber)
@@ -1168,8 +1121,8 @@ protected function rowToRange($rowNumber)
     }
 
     /**
-     * Return default null value
-     * @return string|integer|null
+     * Return default null value.
+     * @return string|int|null
      */
     protected function getDefaultNullValue()
     {
@@ -1177,18 +1130,17 @@ protected function getDefaultNullValue()
     }
 
     /**
-     * Return default null value
-     * @return string|integer|null
+     * Return default null value.
+     * @return string|int|null
      */
     protected function getDefaultStartCell()
     {
         return Config::get('excel.export.sheets.startCell', 'A1');
     }
 
-
     /**
-     * Return default strict null comparison
-     * @return boolean
+     * Return default strict null comparison.
+     * @return bool
      */
     protected function getDefaultStrictNullComparison()
     {
@@ -1196,18 +1148,17 @@ protected function getDefaultStrictNullComparison()
     }
 
     /**
-     * load info from parent obj
-     * @param \PHPExcel_Worksheet $sheet
+     * load info from parent obj.
+     * @param  \PHPExcel_Worksheet $sheet
      * @return $this
      */
-    function cloneParent(PHPExcel_Worksheet $sheet)
+    public function cloneParent(PHPExcel_Worksheet $sheet)
     {
         // Init new reflection object
         $class = new \ReflectionClass(get_class($sheet));
 
         // Loop through all properties
-        foreach($class->getProperties() as $property)
-        {
+        foreach ($class->getProperties() as $property) {
             // Make the property public
             $property->setAccessible(true);
 
@@ -1228,17 +1179,16 @@ function cloneParent(PHPExcel_Worksheet $sheet)
     }
 
     /**
-     * Dynamically call methods
-     * @param  string $method
-     * @param  array  $params
+     * Dynamically call methods.
+     * @param  string                $method
+     * @param  array                 $params
      * @throws LaravelExcelException
      * @return LaravelExcelWorksheet
      */
     public function __call($method, $params)
     {
         // If the dynamic call starts with "with", add the var to the data array
-        if (starts_with($method, 'with'))
-        {
+        if (starts_with($method, 'with')) {
             $key = lcfirst(str_replace('with', '', $method));
             $this->_addVars($key, reset($params));
 
@@ -1246,8 +1196,7 @@ public function __call($method, $params)
         }
 
         // If it's a setter
-        elseif (starts_with($method, 'set'))
-        {
+        elseif (starts_with($method, 'set')) {
             // set the attribute
             $this->_setAttributes($method, $params);
 
@@ -1258,11 +1207,11 @@ public function __call($method, $params)
     }
 
     /**
-     * @param string     $cellValue
-     * @param mixed|null $currentColumn
-     * @param bool       $startRow
-     * @return \PHPExcel_Cell|\PHPExcel_Worksheet|void
+     * @param  string                                  $cellValue
+     * @param  mixed|null                              $currentColumn
+     * @param  bool                                    $startRow
      * @throws PHPExcel_Exception
+     * @return \PHPExcel_Cell|\PHPExcel_Worksheet|void
      */
     public function setValueOfCell($cellValue, $currentColumn, $startRow)
     {
diff --git a/src/Maatwebsite/Excel/Classes/PHPExcel.php b/src/Drivers/PHPExcel/Classes/PHPExcel.php
similarity index 72%
rename from src/Maatwebsite/Excel/Classes/PHPExcel.php
rename to src/Drivers/PHPExcel/Classes/PHPExcel.php
index cfa15ce96..6d8315313 100644
--- a/src/Maatwebsite/Excel/Classes/PHPExcel.php
+++ b/src/Drivers/PHPExcel/Classes/PHPExcel.php
@@ -1,11 +1,12 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class PHPExcel extends PHPOffice_PHPExcel {
-
+class PHPExcel extends PHPOffice_PHPExcel
+{
     /**
-     * Allowed autofill properties
+     * Allowed autofill properties.
      * @var array
      */
-    public $allowedProperties = array(
+    public $allowedProperties = [
         'creator',
         'lastModifiedBy',
         'description',
@@ -28,14 +29,14 @@ class PHPExcel extends PHPOffice_PHPExcel {
         'keywords',
         'category',
         'manager',
-        'company'
-    );
+        'company',
+    ];
 
     /**
-     * Create sheet and add it to this workbook
+     * Create sheet and add it to this workbook.
      *
-     * @param  int|null   $iSheetIndex Index where sheet should go (0,1,..., or null for last)
-     * @param bool|string $title
+     * @param  int|null              $iSheetIndex Index where sheet should go (0,1,..., or null for last)
+     * @param  bool|string           $title
      * @throws \PHPExcel_Exception
      * @return LaravelExcelWorksheet
      */
@@ -52,9 +53,9 @@ public function createSheet($iSheetIndex = null, $title = false)
     }
 
     /**
-     * Check if the user change change the workbook property
+     * Check if the user change change the workbook property.
      * @param  string $method
-     * @return boolean
+     * @return bool
      */
     public function isChangeableProperty($method)
     {
@@ -64,9 +65,8 @@ public function isChangeableProperty($method)
     }
 
     /**
-     * Set default properties
+     * Set default properties.
      * @param array $custom
-     * @return  void
      */
     public function setDefaultProperties($custom = [])
     {
@@ -74,8 +74,7 @@ public function setDefaultProperties($custom = [])
         $properties = $this->getProperties();
 
         // Get fillable properties
-        foreach ($this->getAllowedProperties() as $prop)
-        {
+        foreach ($this->getAllowedProperties() as $prop) {
             // Get the method
             $method = 'set' . ucfirst($prop);
 
@@ -83,23 +82,22 @@ public function setDefaultProperties($custom = [])
             $value = in_array($prop, array_keys($custom)) ? $custom[$prop] : Config::get('excel.properties.' . $prop, null);
 
             // set the property
-            call_user_func_array(array($properties, $method), array($value));
+            call_user_func_array([$properties, $method], [$value]);
         }
     }
 
     /**
-     * load info from parent obj
-     * @param \PHPExcel $object
+     * load info from parent obj.
+     * @param  \PHPExcel $object
      * @return $this
      */
-    function cloneParent(\PHPExcel $object)
+    public function cloneParent(\PHPExcel $object)
     {
         // Init new reflection object
         $class = new \ReflectionClass(get_class($object));
 
         // Loop through all properties
-        foreach($class->getProperties() as $property)
-        {
+        foreach ($class->getProperties() as $property) {
             // Make the property public
             $property->setAccessible(true);
 
@@ -114,7 +112,7 @@ function cloneParent(\PHPExcel $object)
     }
 
     /**
-     * Return all allowed properties
+     * Return all allowed properties.
      * @return array
      */
     public function getAllowedProperties()
diff --git a/src/Maatwebsite/Excel/Collections/CellCollection.php b/src/Drivers/PHPExcel/Collections/CellCollection.php
similarity index 63%
rename from src/Maatwebsite/Excel/Collections/CellCollection.php
rename to src/Drivers/PHPExcel/Collections/CellCollection.php
index 288ad6a99..41dfc1ded 100644
--- a/src/Maatwebsite/Excel/Collections/CellCollection.php
+++ b/src/Drivers/PHPExcel/Collections/CellCollection.php
@@ -1,8 +1,9 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class CellCollection extends ExcelCollection {
-
+class CellCollection extends ExcelCollection
+{
     /**
      * Create a new collection.
-     * @param  array $items
-     * @return \Maatwebsite\Excel\Collections\CellCollection
+     * @param  array                                                          $items
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Collections\CellCollection
      */
-    public function __construct(array $items = array())
+    public function __construct(array $items = [])
     {
         $this->setItems($items);
     }
 
     /**
-     * Set the items
+     * Set the items.
      * @param array $items
-     * @return void
      */
     public function setItems($items)
     {
-        foreach ($items as $name => $value)
-        {
+        foreach ($items as $name => $value) {
             $value = !empty($value) || is_numeric($value) ? $value : null;
 
-            if ($name)
-            {
+            if ($name) {
                 $this->put($name, $value);
-            }
-            else
-            {
+            } else {
                 $this->push($value);
             }
         }
     }
 
     /**
-     * Dynamically get values
+     * Dynamically get values.
      * @param  string $key
      * @return string
      */
     public function __get($key)
     {
-        if ($this->has($key))
+        if ($this->has($key)) {
             return $this->get($key);
+        }
     }
 
     /**
      * Determine if an attribute exists on the model.
      *
-     * @param  string  $key
+     * @param  string $key
      * @return bool
      */
     public function __isset($key)
diff --git a/src/Maatwebsite/Excel/Collections/ExcelCollection.php b/src/Drivers/PHPExcel/Collections/ExcelCollection.php
similarity index 75%
rename from src/Maatwebsite/Excel/Collections/ExcelCollection.php
rename to src/Drivers/PHPExcel/Collections/ExcelCollection.php
index 2bd3424bd..6456857bd 100644
--- a/src/Maatwebsite/Excel/Collections/ExcelCollection.php
+++ b/src/Drivers/PHPExcel/Collections/ExcelCollection.php
@@ -1,10 +1,11 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class ExcelCollection extends Collection {
-
+class ExcelCollection extends Collection
+{
     /**
-     * Sheet title
+     * Sheet title.
      * @var [type]
      */
     protected $title;
 
     /**
-     * Get the title
+     * Get the title.
      * @return string
      */
     public function getTitle()
@@ -31,11 +32,11 @@ public function getTitle()
     }
 
     /**
-     * Set the title
+     * Set the title.
      * @param $title
      */
     public function setTitle($title)
     {
         $this->title = $title;
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Collections/RowCollection.php b/src/Drivers/PHPExcel/Collections/RowCollection.php
similarity index 67%
rename from src/Maatwebsite/Excel/Collections/RowCollection.php
rename to src/Drivers/PHPExcel/Collections/RowCollection.php
index 5f572f121..c2cd3b71a 100644
--- a/src/Maatwebsite/Excel/Collections/RowCollection.php
+++ b/src/Drivers/PHPExcel/Collections/RowCollection.php
@@ -1,8 +1,9 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class RowCollection extends ExcelCollection {
-
-}
\ No newline at end of file
+class RowCollection extends ExcelCollection
+{
+}
diff --git a/src/Maatwebsite/Excel/Collections/SheetCollection.php b/src/Drivers/PHPExcel/Collections/SheetCollection.php
similarity index 67%
rename from src/Maatwebsite/Excel/Collections/SheetCollection.php
rename to src/Drivers/PHPExcel/Collections/SheetCollection.php
index 9c95d97d0..c4edf9199 100644
--- a/src/Maatwebsite/Excel/Collections/SheetCollection.php
+++ b/src/Drivers/PHPExcel/Collections/SheetCollection.php
@@ -1,8 +1,9 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class SheetCollection extends ExcelCollection {
-
-}
\ No newline at end of file
+class SheetCollection extends ExcelCollection
+{
+}
diff --git a/src/Maatwebsite/Excel/Excel.php b/src/Drivers/PHPExcel/Excel.php
similarity index 58%
rename from src/Maatwebsite/Excel/Excel.php
rename to src/Drivers/PHPExcel/Excel.php
index 09322ca3c..c9bee2b7f 100644
--- a/src/Maatwebsite/Excel/Excel.php
+++ b/src/Drivers/PHPExcel/Excel.php
@@ -1,70 +1,60 @@
-
- * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
- */
-class Excel {
-
+class Excel implements ExcelInterface
+{
     /**
-     * Filter
+     * Filter.
      * @var array
      */
-    protected $filters = array(
-        'registered' =>  array(),
-        'enabled'    =>  array()
-    );
+    protected $filters = [
+        'registered' => [],
+        'enabled'    => [],
+    ];
 
     /**
-     * Excel object
+     * Excel object.
      * @var PHPExcel
      */
     protected $excel;
 
     /**
-     * Reader object
+     * Reader object.
      * @var LaravelExcelReader
      */
     protected $reader;
 
     /**
-     * Writer object
+     * Writer object.
      * @var LaravelExcelWriter
      */
     protected $writer;
 
     /**
-     * Construct Excel
-     * @param  PHPExcel           $excel
-     * @param  LaravelExcelReader $reader
-     * @param  LaravelExcelWriter $writer
+     * @param PHPExcel           $excel
+     * @param LaravelExcelReader $reader
+     * @param LaravelExcelWriter $writer
      */
     public function __construct(PHPExcel $excel, LaravelExcelReader $reader, LaravelExcelWriter $writer)
     {
-        // Set Excel dependencies
-        $this->excel = $excel;
+        $this->excel  = $excel;
         $this->reader = $reader;
         $this->writer = $writer;
     }
 
     /**
-     * Create a new file
-     * @param                $filename
-     * @param  callable|null $callback
+     * Create a new file.
+     * @param                     $filename
+     * @param  callable|null      $callback
      * @return LaravelExcelWriter
      */
     public function create($filename, $callback = null)
@@ -83,21 +73,21 @@ public function create($filename, $callback = null)
         $writer->setTitle($filename);
 
         // Do the callback
-        if ($callback instanceof Closure)
+        if ($callback instanceof Closure) {
             call_user_func($callback, $writer);
+        }
 
         // Return the writer object
         return $writer;
     }
 
     /**
+     *  Load an existing file.
      *
-     *  Load an existing file
-     *
-     * @param  string        $file The file we want to load
-     * @param  callback|null $callback
-     * @param  string|null   $encoding
-     * @param bool           $noBasePath
+     * @param  string             $file       The file we want to load
+     * @param  callback|null      $callback
+     * @param  string|null        $encoding
+     * @param  bool               $noBasePath
      * @return LaravelExcelReader
      */
     public function load($file, $callback = null, $encoding = null, $noBasePath = false, $callbackConfigReader = null)
@@ -118,19 +108,20 @@ public function load($file, $callback = null, $encoding = null, $noBasePath = fa
         $reader->load($file, $encoding, $noBasePath, $callbackConfigReader);
 
         // Do the callback
-        if ($callback instanceof Closure)
+        if ($callback instanceof Closure) {
             call_user_func($callback, $reader);
+        }
 
         // Return the reader object
         return $reader;
     }
 
     /**
-     * Set select sheets
+     * Set select sheets.
      * @param  $sheets
      * @return LaravelExcelReader
      */
-    public function selectSheets($sheets = array())
+    public function selectSheets($sheets = [])
     {
         $sheets = is_array($sheets) ? $sheets : func_get_args();
         $this->reader->setSelectedSheets($sheets);
@@ -139,11 +130,11 @@ public function selectSheets($sheets = array())
     }
 
     /**
-     * Select sheets by index
-     * @param array $sheets
+     * Select sheets by index.
+     * @param  array $sheets
      * @return $this
      */
-    public function selectSheetsByIndex($sheets = array())
+    public function selectSheetsByIndex($sheets = [])
     {
         $sheets = is_array($sheets) ? $sheets : func_get_args();
         $this->reader->setSelectedSheetIndices($sheets);
@@ -152,12 +143,12 @@ public function selectSheetsByIndex($sheets = array())
     }
 
     /**
-     * Batch import
+     * Batch import.
      * @param           $files
-     * @param  callback $callback
+     * @param  callable $callback
      * @return PHPExcel
      */
-    public function batch($files, Closure $callback)
+    public function batch($files, callable $callback)
     {
         $batch = new Batch;
 
@@ -165,76 +156,74 @@ public function batch($files, Closure $callback)
     }
 
     /**
-     * Create a new file and share a view
-     * @param  string $view
-     * @param  array  $data
-     * @param  array  $mergeData
+     * Create a new file and share a view.
+     * @param  string             $view
+     * @param  array              $data
+     * @param  array              $mergeData
      * @return LaravelExcelWriter
      */
-    public function shareView($view, $data = array(), $mergeData = array())
+    public function shareView($view, $data = [], $mergeData = [])
     {
         return $this->create($view)->shareView($view, $data, $mergeData);
     }
 
     /**
-     * Create a new file and load a view
-     * @param  string $view
-     * @param  array  $data
-     * @param  array  $mergeData
+     * Create a new file and load a view.
+     * @param  string             $view
+     * @param  array              $data
+     * @param  array              $mergeData
      * @return LaravelExcelWriter
      */
-    public function loadView($view, $data = array(), $mergeData = array())
+    public function loadView($view, $data = [], $mergeData = [])
     {
         return $this->shareView($view, $data, $mergeData);
     }
 
     /**
-     * Set filters
-     * @param   array $filters
-     * @return  Excel
+     * Set filters.
+     * @param  array $filters
+     * @return Excel
      */
-    public function registerFilters($filters = array())
+    public function registerFilters($filters = [])
     {
         // If enabled array key exists
-        if(array_key_exists('enabled', $filters))
-        {
+        if (array_key_exists('enabled', $filters)) {
             // Set registered array
             $registered = $filters['registered'];
 
             // Filter on enabled
             $this->filter($filters['enabled']);
-        }
-        else
-        {
+        } else {
             $registered = $filters;
         }
 
         // Register the filters
-        $this->filters['registered'] = !empty($this->filters['registered']) ? array_merge($this->filters['registered'], $registered) : $registered;
+        $this->filters['registered'] = !empty($this->filters['registered']) ? array_merge($this->filters['registered'],
+            $registered) : $registered;
+
         return $this;
     }
 
     /**
-     * Enable certain filters
-     * @param  string|array     $filter
-     * @param bool|false|string $class
+     * Enable certain filters.
+     * @param  string|array      $filter
+     * @param  bool|false|string $class
      * @return Excel
      */
     public function filter($filter, $class = false)
     {
         // Add multiple filters
-        if(is_array($filter))
-        {
-            $this->filters['enabled'] = !empty($this->filters['enabled']) ? array_merge($this->filters['enabled'], $filter) : $filter;
-        }
-        else
-        {
+        if (is_array($filter)) {
+            $this->filters['enabled'] = !empty($this->filters['enabled']) ? array_merge($this->filters['enabled'],
+                $filter) : $filter;
+        } else {
             // Add single filter
             $this->filters['enabled'][] = $filter;
 
             // Overrule filter class for this request
-            if($class)
+            if ($class) {
                 $this->filters['registered'][$filter] = $class;
+            }
         }
 
         // Remove duplicates
@@ -244,8 +233,8 @@ public function filter($filter, $class = false)
     }
 
     /**
-     * Get register, enabled (or both) filters
-     * @param  string|boolean $key [description]
+     * Get register, enabled (or both) filters.
+     * @param  string|bool $key [description]
      * @return array
      */
     public function getFilters($key = false)
@@ -254,23 +243,21 @@ public function getFilters($key = false)
     }
 
     /**
-     * Dynamically call methods
+     * Dynamically call methods.
      * @throws LaravelExcelException
      */
     public function __call($method, $params)
     {
         // If the dynamic call starts with "with", add the var to the data array
-        if (method_exists($this->excel, $method))
-        {
+        if (method_exists($this->excel, $method)) {
             // Call the method from the excel object with the given params
-            return call_user_func_array(array($this->excel, $method), $params);
+            return call_user_func_array([$this->excel, $method], $params);
         }
 
         // If reader method exists, call that one
-        if (method_exists($this->reader, $method))
-        {
+        if (method_exists($this->reader, $method)) {
             // Call the method from the reader object with the given params
-            return call_user_func_array(array($this->reader, $method), $params);
+            return call_user_func_array([$this->reader, $method], $params);
         }
 
         throw new LaravelExcelException('Laravel Excel method [' . $method . '] does not exist');
diff --git a/src/Maatwebsite/Excel/Filters/ChunkReadFilter.php b/src/Drivers/PHPExcel/Filters/ChunkReadFilter.php
similarity index 73%
rename from src/Maatwebsite/Excel/Filters/ChunkReadFilter.php
rename to src/Drivers/PHPExcel/Filters/ChunkReadFilter.php
index 385f0c4b9..11367ceb7 100644
--- a/src/Maatwebsite/Excel/Filters/ChunkReadFilter.php
+++ b/src/Drivers/PHPExcel/Filters/ChunkReadFilter.php
@@ -1,26 +1,27 @@
-= $this->_startRow && $row <= $this->_endRow)) {
             return true;
         }
+
         return false;
     }
 }
diff --git a/src/Maatwebsite/Excel/Parsers/CssParser.php b/src/Drivers/PHPExcel/Parsers/CssParser.php
similarity index 78%
rename from src/Maatwebsite/Excel/Parsers/CssParser.php
rename to src/Drivers/PHPExcel/Parsers/CssParser.php
index 12b45fa64..ff47910dd 100644
--- a/src/Maatwebsite/Excel/Parsers/CssParser.php
+++ b/src/Drivers/PHPExcel/Parsers/CssParser.php
@@ -1,12 +1,12 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class CssParser {
-
+class CssParser
+{
     /**
      * @var CssToInlineStyles
      */
     protected $cssInliner;
 
     /**
-     * DOM xml
+     * DOM xml.
      * @var \SimpleXMLElement
      */
     protected $xml;
 
     /**
-     * Style sheet links
+     * Style sheet links.
      * @var array
      */
-    protected $links = array();
+    protected $links = [];
 
     /**
-     * Construct the css parser
+     * Construct the css parser.
      * @param CssToInlineStyles $cssInliner
      */
     public function __construct(CssToInlineStyles $cssInliner)
@@ -44,7 +44,7 @@ public function __construct(CssToInlineStyles $cssInliner)
     }
 
     /**
-     * Transform the found css to inline styles
+     * Transform the found css to inline styles.
      */
     public function transformCssToInlineStyles($html)
     {
@@ -58,8 +58,7 @@ public function transformCssToInlineStyles($html)
         $this->cssInliner->setUseInlineStylesBlock(true);
 
         // Loop through all stylesheets
-        foreach($this->links as $link)
-        {
+        foreach ($this->links as $link) {
             $css = file_get_contents($link);
             $this->cssInliner->setCSS($css);
         }
@@ -68,8 +67,8 @@ public function transformCssToInlineStyles($html)
     }
 
     /**
-     * Find the stylesheets inside the view
-     * @param DOMDocument $dom
+     * Find the stylesheets inside the view.
+     * @param  DOMDocument $dom
      * @return CssParser
      */
     public function findStyleSheets(DOMDocument $dom)
@@ -80,8 +79,7 @@ public function findStyleSheets(DOMDocument $dom)
         // Get all stylesheet tags
         $tags = $this->getStyleSheetTags();
 
-        foreach ($tags as $node)
-        {
+        foreach ($tags as $node) {
             $this->links[] = $this->getCleanStyleSheetLink($node);
         }
 
@@ -92,7 +90,7 @@ public function findStyleSheets(DOMDocument $dom)
     }
 
     /**
-     * Import the dom
+     * Import the dom.
      * @return SimpleXMLElement
      */
     protected function importDom(DOMDocument $dom)
@@ -101,7 +99,7 @@ protected function importDom(DOMDocument $dom)
     }
 
     /**
-     * Get all stylesheet tags
+     * Get all stylesheet tags.
      * @return array
      */
     protected function getStyleSheetTags()
@@ -110,7 +108,7 @@ protected function getStyleSheetTags()
     }
 
     /**
-     * Get the clean link to the stylesheet
+     * Get the clean link to the stylesheet.
      * @param  string $node
      * @return string
      */
@@ -123,9 +121,9 @@ protected function getCleanStyleSheetLink($node)
     }
 
     /**
-     * Get css from link
-     * @param  string $link
-     * @return string|boolean
+     * Get css from link.
+     * @param  string      $link
+     * @return string|bool
      */
     protected function getCssFromLink($link)
     {
diff --git a/src/Maatwebsite/Excel/Parsers/ExcelParser.php b/src/Drivers/PHPExcel/Parsers/ExcelParser.php
similarity index 77%
rename from src/Maatwebsite/Excel/Parsers/ExcelParser.php
rename to src/Drivers/PHPExcel/Parsers/ExcelParser.php
index b19e48068..0c6c84dbc 100644
--- a/src/Maatwebsite/Excel/Parsers/ExcelParser.php
+++ b/src/Drivers/PHPExcel/Parsers/ExcelParser.php
@@ -1,20 +1,20 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class ExcelParser {
-
+class ExcelParser
+{
     /**
-     * If file is parsed
-     * @var boolean
+     * If file is parsed.
+     * @var bool
      */
     public $isParsed = false;
 
     /**
-     * Reader object
+     * Reader object.
      * @var LaravelExcelReader
      */
     protected $reader;
 
     /**
-     * Excel object
+     * Excel object.
      * @var PHPExcel
      */
     protected $excel;
 
     /**
-     * Worksheet object
+     * Worksheet object.
      * @var LaravelExcelWorksheet
      */
     protected $worksheet;
 
     /**
-     * Row object
+     * Row object.
      * @var PHPExcel_Worksheet_Row
      */
     protected $row;
 
     /**
-     * Cell object
+     * Cell object.
      * @var PHPExcel_Cell
      */
     protected $cell;
 
     /**
-     * Indices
+     * Indices.
      * @var array
      */
     protected $indices;
 
     /**
-     * Columns we want to fetch
+     * Columns we want to fetch.
      * @var array
      */
-    protected $columns = array();
+    protected $columns = [];
 
     /**
-     * Row counter
-     * @var integer
+     * Row counter.
+     * @var int
      */
     protected $currentRow = 1;
 
     /**
-     * Default startrow
-     * @var integer
+     * Default startrow.
+     * @var int
      */
     protected $defaultStartRow = 1;
 
     /**
-     * Construct excel parser
-     * @param LaravelExcelReader $reader
-     * @return \Maatwebsite\Excel\Parsers\ExcelParser
+     * Construct excel parser.
+     * @param  LaravelExcelReader                                      $reader
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Parsers\ExcelParser
      */
-    public function  __construct($reader)
+    public function __construct($reader)
     {
         $this->reader = $reader;
-        $this->excel = $reader->excel;
+        $this->excel  = $reader->excel;
 
         $this->defaultStartRow = $this->currentRow = Config::get('excel.import.startRow', 1);
 
@@ -102,11 +102,11 @@ public function  __construct($reader)
     }
 
     /**
-     *  Parse the file
-     * @param array $columns
+     *  Parse the file.
+     * @param  array           $columns
      * @return SheetCollection
      */
-    public function parseFile($columns = array())
+    public function parseFile($columns = [])
     {
         // Init new sheet collection
         $workbook = new SheetCollection();
@@ -115,8 +115,7 @@ public function parseFile($columns = array())
         $this->setSelectedColumns($columns);
 
         // If not parsed yet
-        if ( !$this->isParsed )
-        {
+        if (!$this->isParsed) {
             // Set worksheet count
             $this->w = 0;
 
@@ -124,23 +123,18 @@ public function parseFile($columns = array())
             $iterator = $this->excel->getWorksheetIterator();
 
             // Loop through the worksheets
-            foreach ($iterator as $this->worksheet)
-            {
+            foreach ($iterator as $this->worksheet) {
                 // Check if the sheet might have been selected by it's index
-                if ( $this->reader->isSelectedByIndex($iterator->key()) )
-                {
+                if ($this->reader->isSelectedByIndex($iterator->key())) {
                     // Parse the worksheet
                     $worksheet = $this->parseWorksheet();
 
                     // If multiple sheets
-                    if ( $this->parseAsMultiple() )
-                    {
+                    if ($this->parseAsMultiple()) {
                         // Push every sheet
                         $workbook->push($worksheet);
                         $workbook->setTitle($this->excel->getProperties()->getTitle());
-                    }
-                    else
-                    {
+                    } else {
                         // Ignore the sheet collection
                         $workbook = $worksheet;
                         break;
@@ -158,8 +152,8 @@ public function parseFile($columns = array())
     }
 
     /**
-     * Check if we want to parse it as multiple sheets
-     * @return boolean
+     * Check if we want to parse it as multiple sheets.
+     * @return bool
      */
     protected function parseAsMultiple()
     {
@@ -168,7 +162,7 @@ protected function parseAsMultiple()
     }
 
     /**
-     * Parse the worksheet
+     * Parse the worksheet.
      * @return RowCollection
      */
     protected function parseWorksheet()
@@ -177,14 +171,14 @@ protected function parseWorksheet()
         $this->excel->setActiveSheetIndex($this->w);
 
         // Fetch the labels
-        $this->indices = $this->reader->hasHeading() ? $this->getIndices() : array();
+        $this->indices = $this->reader->hasHeading() ? $this->getIndices() : [];
 
         // Parse the rows
         return $this->parseRows();
     }
 
     /**
-     *  Get the indices
+     *  Get the indices.
      * @return array
      */
     protected function getIndices()
@@ -193,11 +187,10 @@ protected function getIndices()
         $this->row = $this->worksheet->getRowIterator($this->defaultStartRow)->current();
 
         // Set empty labels array
-        $this->indices = array();
+        $this->indices = [];
 
         // Loop through the cells
-        foreach ($this->row->getCellIterator() as $this->cell)
-        {
+        foreach ($this->row->getCellIterator() as $this->cell) {
             $this->indices[] = $this->getIndex($this->cell);
         }
 
@@ -206,7 +199,7 @@ protected function getIndices()
     }
 
     /**
-     * Get index
+     * Get index.
      * @param  $cell
      * @return string
      */
@@ -219,16 +212,16 @@ protected function getIndex($cell)
         // Get value
         $value = $this->getOriginalIndex($cell);
 
-        switch ($config)
-        {
+        switch ($config) {
             case 'slugged':
                 return $this->getSluggedIndex($value, Config::get('excel.import.to_ascii', true));
                 break;
             case 'slugged_with_count':
                 $index = $this->getSluggedIndex($value, Config::get('excel.import.to_ascii', true));
-                if(in_array($index,$this->indices)){
+                if (in_array($index, $this->indices)) {
                     $index = $this->appendOrIncreaseStringCount($index);
                 }
+
                 return $index;
                 break;
 
@@ -251,35 +244,31 @@ protected function getIndex($cell)
     }
 
     /**
-     * Append or increase the count at the String like: test to test_1
-     * @param string $index
+     * Append or increase the count at the String like: test to test_1.
+     * @param  string $index
      * @return string
      */
     protected function appendOrIncreaseStringCount($index)
     {
         do {
-            if (preg_match("/(\d+)$/",$index,$matches) === 1)
-            {
+            if (preg_match("/(\d+)$/", $index, $matches) === 1) {
                 // increase +1
-                $index = preg_replace_callback( "/(\d+)$/",
+                $index = preg_replace_callback("/(\d+)$/",
                     function ($matches) {
                         return ++$matches[1];
                     }, $index);
-            }
-            else
-            {
+            } else {
                 $index .= '_1';
             }
-
-        } while(in_array($index,$this->indices));
+        } while (in_array($index, $this->indices));
 
         return $index;
     }
 
     /**
-     * Get slugged index
+     * Get slugged index.
      * @param  string $value
-     * @param bool    $ascii
+     * @param  bool   $ascii
      * @return string
      */
     protected function getSluggedIndex($value, $ascii = false)
@@ -288,11 +277,12 @@ protected function getSluggedIndex($value, $ascii = false)
         $separator = $this->reader->getSeparator();
 
         // Convert to ascii when needed
-        if ( $ascii )
+        if ($ascii) {
             $value = $this->getAsciiIndex($value);
+        }
 
         // Convert all dashes/underscores into separator
-        $flip = $separator == '-' ? '_' : '-';
+        $flip  = $separator == '-' ? '_' : '-';
         $value = preg_replace('![' . preg_quote($flip) . ']+!u', $separator, $value);
 
         // Remove all characters that are not the separator, letters, numbers, or whitespace.
@@ -305,7 +295,7 @@ protected function getSluggedIndex($value, $ascii = false)
     }
 
     /**
-     * Get ASCII index
+     * Get ASCII index.
      * @param  string $value
      * @return string
      */
@@ -315,7 +305,7 @@ protected function getAsciiIndex($value)
     }
 
     /**
-     * Hahsed index
+     * Hahsed index.
      * @param  string $value
      * @return string
      */
@@ -325,7 +315,7 @@ protected function getHashedIndex($value)
     }
 
     /**
-     * Get translated index
+     * Get translated index.
      * @param  string $value
      * @return string
      */
@@ -335,7 +325,7 @@ protected function getTranslatedIndex($value)
     }
 
     /**
-     * Get orignal indice
+     * Get orignal indice.
      * @param $cell
      * @return string
      */
@@ -345,7 +335,7 @@ protected function getOriginalIndex($cell)
     }
 
     /**
-     *  Parse the rows
+     *  Parse the rows.
      * @return RowCollection
      */
     protected function parseRows()
@@ -361,16 +351,16 @@ protected function parseRows()
 
         try {
             $rows = $this->worksheet->getRowIterator($startRow);
-        } catch(PHPExcel_Exception $e) {
+        } catch (PHPExcel_Exception $e) {
             $rows = [];
         }
 
         // Loop through the rows inside the worksheet
-        foreach ($rows as $this->row)
-        {
+        foreach ($rows as $this->row) {
             // Limit the results when needed
-            if ( $this->hasReachedLimit() )
+            if ($this->hasReachedLimit()) {
                 break;
+            }
 
             // Push the parsed cells inside the parsed rows
             $parsedRows->push($this->parseCells());
@@ -384,8 +374,8 @@ protected function parseRows()
     }
 
     /**
-     * Get the startrow
-     * @return integer
+     * Get the startrow.
+     * @return int
      */
     protected function getStartRow()
     {
@@ -393,23 +383,25 @@ protected function getStartRow()
         $startRow = $this->defaultStartRow;
 
         // If the reader has a heading, skip the first row
-        if ( $this->reader->hasHeading() )
+        if ($this->reader->hasHeading()) {
             $startRow++;
+        }
 
         // Get the amount of rows to skip
         $skip = $this->reader->getSkip();
 
         // If we want to skip rows, add the amount of rows
-        if ( $skip > 0 )
+        if ($skip > 0) {
             $startRow = $startRow + $skip;
+        }
 
         // Return the startrow
         return $startRow;
     }
 
     /**
-     * Check for the limit
-     * @return boolean
+     * Check for the limit.
+     * @return bool
      */
     protected function hasReachedLimit()
     {
@@ -421,13 +413,13 @@ protected function hasReachedLimit()
     }
 
     /**
-     * Parse the cells of the given row
+     * Parse the cells of the given row.
      * @return CellCollection
      */
     protected function parseCells()
     {
-        $i = 0;
-        $parsedCells = array();
+        $i           = 0;
+        $parsedCells = [];
 
         try {
             // Set the cell iterator
@@ -437,28 +429,25 @@ protected function parseCells()
             $cellIterator->setIterateOnlyExistingCells($this->reader->needsIgnoreEmpty());
 
             // Foreach cells
-            foreach ($cellIterator as $this->cell)
-            {
+            foreach ($cellIterator as $this->cell) {
                 // Check how we need to save the parsed array
                 $index = ($this->reader->hasHeading() && isset($this->indices[$i])) ? $this->indices[$i] : $this->getIndexFromColumn();
 
                 // Check if we want to select this column
-                if ( $this->cellNeedsParsing($index) )
-                {
+                if ($this->cellNeedsParsing($index)) {
                     // Set the value
                     $parsedCells[(string) $index] = $this->parseCell($index);
                 }
 
                 $i++;
             }
-
         } catch (PHPExcel_Exception $e) {
             // silently ignore the 'No cells exist within the specified range' error, but rethrow any others
             if ($e->getMessage() != 'No cells exist within the specified range') {
                 throw $e;
             }
             // make sure that we return an empty CellCollection
-            $parsedCells = array();
+            $parsedCells = [];
         }
 
         // Return array with parsed cells
@@ -466,34 +455,30 @@ protected function parseCells()
     }
 
     /**
-     * Parse a single cell
-     * @param  integer $index
+     * Parse a single cell.
+     * @param  int    $index
      * @return string
      */
     protected function parseCell($index)
     {
         // If the cell is a date time
-        if ( $this->cellIsDate($index) )
-        {
+        if ($this->cellIsDate($index)) {
             // Parse the date
             return $this->parseDate();
         }
 
         // Check if we want calculated values or not
-        elseif ( $this->reader->needsCalculation() )
-        {
+        elseif ($this->reader->needsCalculation()) {
             // Get calculated value
             return $this->getCalculatedValue();
-        }
-        else
-        {
+        } else {
             // Get real value
             return $this->getCellValue();
         }
     }
 
     /**
-     * Return the cell value
+     * Return the cell value.
      * @return string
      */
     protected function getCellValue()
@@ -504,7 +489,7 @@ protected function getCellValue()
     }
 
     /**
-     * Get the calculated value
+     * Get the calculated value.
      * @return string
      */
     protected function getCalculatedValue()
@@ -515,51 +500,48 @@ protected function getCalculatedValue()
     }
 
     /**
-     * Encode with iconv
+     * Encode with iconv.
      * @param  string $value
      * @return string
      */
     protected function encode($value)
     {
         // Get input and output encoding
-        list($input, $output) = array_values(Config::get('excel.import.encoding', array('UTF-8', 'UTF-8')));
+        list($input, $output) = array_values(Config::get('excel.import.encoding', ['UTF-8', 'UTF-8']));
 
         // If they are the same, return the value
-        if ( $input == $output )
+        if ($input == $output) {
             return $value;
+        }
 
         // Encode
         return iconv($input, $output, $value);
     }
 
     /**
-     * Parse the date
+     * Parse the date.
      * @return Carbon\Carbon|string
      */
     protected function parseDate()
     {
         // If the date needs formatting
-        if ( $this->reader->needsDateFormatting() )
-        {
+        if ($this->reader->needsDateFormatting()) {
             // Parse the date with carbon
             return $this->parseDateAsCarbon();
-        }
-        else
-        {
+        } else {
             // Parse the date as a normal string
             return $this->parseDateAsString();
         }
     }
 
     /**
-     * Parse and return carbon object or formatted time string
+     * Parse and return carbon object or formatted time string.
      * @return Carbon\Carbon
      */
     protected function parseDateAsCarbon()
     {
         // If has a date
-        if ( $cellContent = $this->cell->getCalculatedValue() )
-        {
+        if ($cellContent = $this->cell->getCalculatedValue()) {
             // Convert excel time to php date object
             $date = PHPExcel_Shared_Date::ExcelToPHPObject($this->cell->getCalculatedValue())->format('Y-m-d H:i:s');
 
@@ -574,7 +556,7 @@ protected function parseDateAsCarbon()
     }
 
     /**
-     * Return date string
+     * Return date string.
      * @return string
      */
     protected function parseDateAsString()
@@ -590,25 +572,22 @@ protected function parseDateAsString()
     }
 
     /**
-     * Check if cell is a date
-     * @param  integer $index
-     * @return boolean
+     * Check if cell is a date.
+     * @param  int  $index
+     * @return bool
      */
     protected function cellIsDate($index)
     {
         // if is a date or if is a date column
-        if ( $this->reader->getDateColumns() )
-        {
+        if ($this->reader->getDateColumns()) {
             return in_array($index, $this->reader->getDateColumns());
-        }
-        else
-        {
+        } else {
             return PHPExcel_Shared_Date::isDateTime($this->cell);
         }
     }
 
     /**
-     * Check if cells needs parsing
+     * Check if cells needs parsing.
      * @return array
      */
     protected function cellNeedsParsing($index)
@@ -618,8 +597,8 @@ protected function cellNeedsParsing($index)
     }
 
     /**
-     * Get the cell index from column
-     * @return integer
+     * Get the cell index from column.
+     * @return int
      */
     protected function getIndexFromColumn()
     {
@@ -627,18 +606,18 @@ protected function getIndexFromColumn()
     }
 
     /**
-     * Set selected columns
+     * Set selected columns.
      * @param array $columns
      */
-    protected function setSelectedColumns($columns = array())
+    protected function setSelectedColumns($columns = [])
     {
         // Set the columns
         $this->columns = $columns;
     }
 
     /**
-     * Check if we have selected columns
-     * @return boolean
+     * Check if we have selected columns.
+     * @return bool
      */
     protected function hasSelectedColumns()
     {
@@ -646,7 +625,7 @@ protected function hasSelectedColumns()
     }
 
     /**
-     * Set selected columns
+     * Set selected columns.
      * @return array
      */
     protected function getSelectedColumns()
@@ -656,12 +635,11 @@ protected function getSelectedColumns()
     }
 
     /**
-     * Reset
-     * @return void
+     * Reset.
      */
     protected function reset()
     {
-        $this->indices = array();
+        $this->indices  = [];
         $this->isParsed = false;
     }
 }
diff --git a/src/Maatwebsite/Excel/Parsers/ViewParser.php b/src/Drivers/PHPExcel/Parsers/ViewParser.php
similarity index 58%
rename from src/Maatwebsite/Excel/Parsers/ViewParser.php
rename to src/Drivers/PHPExcel/Parsers/ViewParser.php
index 8cca4a33c..49bb091fa 100644
--- a/src/Maatwebsite/Excel/Parsers/ViewParser.php
+++ b/src/Drivers/PHPExcel/Parsers/ViewParser.php
@@ -1,11 +1,12 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class ViewParser {
-
+class ViewParser
+{
     /**
-     * View file
+     * View file.
      * @var string
      */
     public $view;
 
     /**
-     * Data array
+     * Data array.
      * @var array
      */
-    public $data = array();
+    public $data = [];
 
     /**
-     * View merge data
+     * View merge data.
      * @var array
      */
-    public $mergeData = array();
+    public $mergeData = [];
 
     /**
-     * Construct the view parser
-     * @param Html $reader
-     * @return \Maatwebsite\Excel\Parsers\ViewParser
+     * Construct the view parser.
+     * @param  Html                                                   $reader
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Parsers\ViewParser
      */
     public function __construct(Html $reader)
     {
@@ -45,9 +46,9 @@ public function __construct(Html $reader)
     }
 
     /**
-     * Parse the view
-     * @param  \Maatwebsite\Excel\Classes\LaravelExcelWorksheet $sheet
-     * @return \Maatwebsite\Excel\Classes\LaravelExcelWorksheet
+     * Parse the view.
+     * @param  \Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet $sheet
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet
      */
     public function parse($sheet)
     {
@@ -57,10 +58,10 @@ public function parse($sheet)
     }
 
     /**
-     * Load the HTML
-     * @param  \Maatwebsite\Excel\Classes\LaravelExcelWorksheet $sheet
-     * @param  string                                           $html
-     * @return \Maatwebsite\Excel\Classes\LaravelExcelWorksheet
+     * Load the HTML.
+     * @param  \Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet $sheet
+     * @param  string                                                            $html
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet
      */
     protected function _loadHTML($sheet, $html)
     {
@@ -68,7 +69,7 @@ protected function _loadHTML($sheet, $html)
     }
 
     /**
-     * Get the view
+     * Get the view.
      * @return string
      */
     public function getView()
@@ -77,7 +78,7 @@ public function getView()
     }
 
     /**
-     * Get data
+     * Get data.
      * @return array
      */
     public function getData()
@@ -86,7 +87,7 @@ public function getData()
     }
 
     /**
-     * Get merge data
+     * Get merge data.
      * @return array
      */
     public function getMergeData()
@@ -95,32 +96,35 @@ public function getMergeData()
     }
 
     /**
-     * Set the view
+     * Set the view.
      * @param bool|string $view
      */
     public function setView($view = false)
     {
-        if ($view)
+        if ($view) {
             $this->view = $view;
+        }
     }
 
     /**
-     * Set the data
+     * Set the data.
      * @param array $data
      */
-    public function setData($data = array())
+    public function setData($data = [])
     {
-        if (!empty($data))
+        if (!empty($data)) {
             $this->data = array_merge($this->data, $data);
+        }
     }
 
     /**
-     * Set the merge data
+     * Set the merge data.
      * @param array $mergeData
      */
-    public function setMergeData($mergeData = array())
+    public function setMergeData($mergeData = [])
     {
-        if (!empty($mergeData))
+        if (!empty($mergeData)) {
             $this->mergeData = array_merge($this->mergeData, $mergeData);
+        }
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Readers/Batch.php b/src/Drivers/PHPExcel/Readers/Batch.php
similarity index 74%
rename from src/Maatwebsite/Excel/Readers/Batch.php
rename to src/Drivers/PHPExcel/Readers/Batch.php
index a397d5f52..886278c59 100644
--- a/src/Maatwebsite/Excel/Readers/Batch.php
+++ b/src/Drivers/PHPExcel/Readers/Batch.php
@@ -1,12 +1,13 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class Batch {
-
+class Batch
+{
     /**
-     * Excel object
+     * Excel object.
      * @var Excel
      */
     protected $excel;
 
     /**
-     * Batch files
+     * Batch files.
      * @var array
      */
-    public $files = array();
+    public $files = [];
 
     /**
-     * Set allowed file extensions
+     * Set allowed file extensions.
      * @var array
      */
-    protected $allowedFileExtensions = array(
+    protected $allowedFileExtensions = [
         'xls',
         'xlsx',
-        'csv'
-    );
+        'csv',
+    ];
 
     /**
-     * Start the Batach
+     * Start the Batach.
      * @param  Excel   $excel
      * @param  array   $files
      * @param  Closure $callback
@@ -55,10 +56,8 @@ public function start(Excel $excel, $files, Closure $callback)
         $this->_setFiles($files);
 
         // Do the callback
-        if ($callback instanceof Closure)
-        {
-            foreach ($this->getFiles() as $file)
-            {
+        if ($callback instanceof Closure) {
+            foreach ($this->getFiles() as $file) {
                 // Load the file
                 $excel = $this->excel->load($file);
 
@@ -72,7 +71,7 @@ public function start(Excel $excel, $files, Closure $callback)
     }
 
     /**
-     * Get the files
+     * Get the files.
      * @return array
      */
     public function getFiles()
@@ -81,41 +80,38 @@ public function getFiles()
     }
 
     /**
-     * Set the batch files
-     * @param array|string $files
+     * Set the batch files.
+     * @param  array|string          $files
      * @throws LaravelExcelException
-     * @return void
      */
     protected function _setFiles($files)
     {
         // If the param is an array, these will be the files for the batch import
-        if (is_array($files))
-        {
+        if (is_array($files)) {
             $this->files = $this->_getFilesByArray($files);
         }
 
         // Get all the files inside a folder
-        elseif (is_string($files))
-        {
+        elseif (is_string($files)) {
             $this->files = $this->_getFilesByFolder($files);
         }
 
         // Check if files were found
-        if (empty($this->files))
+        if (empty($this->files)) {
             throw new LaravelExcelException('[ERROR]: No files were found. Batch terminated.');
+        }
     }
 
     /**
-     * Set files by array
+     * Set files by array.
      * @param  array $array
      * @return array
      */
     protected function _getFilesByArray($array)
     {
-        $files = array();
+        $files = [];
         // Make sure we have real paths
-        foreach ($array as $i => $file)
-        {
+        foreach ($array as $i => $file) {
             $files[$i] = realpath($file) ? $file : base_path($file);
         }
 
@@ -123,26 +119,28 @@ protected function _getFilesByArray($array)
     }
 
     /**
-     * Get all files inside a folder
+     * Get all files inside a folder.
      * @param  string $folder
      * @return array
      */
     protected function _getFilesByFolder($folder)
     {
         // Check if it's a real path
-        if (!realpath($folder))
+        if (!realpath($folder)) {
             $folder = base_path($folder);
+        }
 
         // Find path names matching our pattern of excel extensions
         $glob = glob($folder . '/*.{' . implode(',', $this->allowedFileExtensions) . '}', GLOB_BRACE);
 
         // If no matches, return empty array
-        if ($glob === false) return array();
+        if ($glob === false) {
+            return [];
+        }
 
         // Return files
-        return array_filter($glob, function ($file)
-        {
+        return array_filter($glob, function ($file) {
             return filetype($file) == 'file';
         });
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php b/src/Drivers/PHPExcel/Readers/ChunkedReadJob.php
similarity index 95%
rename from src/Maatwebsite/Excel/Readers/ChunkedReadJob.php
rename to src/Drivers/PHPExcel/Readers/ChunkedReadJob.php
index 4e6003982..54a4bb891 100644
--- a/src/Maatwebsite/Excel/Readers/ChunkedReadJob.php
+++ b/src/Drivers/PHPExcel/Readers/ChunkedReadJob.php
@@ -1,9 +1,9 @@
 
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class ConfigReader {
-
+class ConfigReader
+{
     /**
-     * Excel object
+     * Excel object.
      * @var PHPExcel
      */
     public $excel;
 
     /**
-     * The sheet
+     * The sheet.
      * @var LaravelExcelWorksheet
      */
     public $sheet;
 
     /**
-     * The sheetname
+     * The sheetname.
      * @var string
      */
     public $sheetName;
 
     /**
-     * Collection of sheets (through the config reader)
+     * Collection of sheets (through the config reader).
      * @var SheetCollection
      */
     public $sheetCollection;
 
     /**
-     * Constructor
+     * Constructor.
      * @param PHPExcel $excel
      * @param string   $config
      * @param callback $callback
@@ -63,10 +63,9 @@ public function __construct(PHPExcel $excel, $config = 'excel.import', $callback
     }
 
     /**
-     * Start the import
-     * @param bool|callable $callback $callback
+     * Start the import.
+     * @param  bool|callable       $callback $callback
      * @throws \PHPExcel_Exception
-     * @return void
      */
     public function start($callback = false)
     {
@@ -74,11 +73,9 @@ public function start($callback = false)
         $this->sheetCollection = new SheetCollection();
 
         // Get the sheet names
-        if ($sheets = $this->excel->getSheetNames())
-        {
+        if ($sheets = $this->excel->getSheetNames()) {
             // Loop through the sheets
-            foreach ($sheets as $index => $name)
-            {
+            foreach ($sheets as $index => $name) {
                 // Set sheet name
                 $this->sheetName = $name;
 
@@ -86,13 +83,11 @@ public function start($callback = false)
                 $this->sheet = $this->excel->setActiveSheetIndex($index);
 
                 // Do the callback
-                if ($callback instanceof Closure)
-                {
+                if ($callback instanceof Closure) {
                     call_user_func($callback, $this);
                 }
                 // If no callback, put it inside the sheet collection
-                else
-                {
+                else {
                     $this->sheetCollection->push(clone $this);
                 }
             }
@@ -100,7 +95,7 @@ public function start($callback = false)
     }
 
     /**
-     * Get the sheet collection
+     * Get the sheet collection.
      * @return SheetCollection
      */
     public function getSheetCollection()
@@ -109,8 +104,8 @@ public function getSheetCollection()
     }
 
     /**
-     * Get value by index
-     * @param  string $field
+     * Get value by index.
+     * @param  string      $field
      * @return string|null
      */
     protected function valueByIndex($field)
@@ -119,8 +114,7 @@ protected function valueByIndex($field)
         $field = snake_case($field);
 
         // Get coordinate
-        if ($coordinate = $this->getCoordinateByKey($field))
-        {
+        if ($coordinate = $this->getCoordinateByKey($field)) {
             // return cell value by coordinate
             return $this->getCellValueByCoordinate($coordinate);
         }
@@ -129,23 +123,19 @@ protected function valueByIndex($field)
     }
 
     /**
-     * Return cell value
-     * @param  string $coordinate
+     * Return cell value.
+     * @param  string      $coordinate
      * @return string|null
      */
     protected function getCellValueByCoordinate($coordinate)
     {
-        if ($this->sheet)
-        {
-            if (str_contains($coordinate, ':'))
-            {
+        if ($this->sheet) {
+            if (str_contains($coordinate, ':')) {
                 // We want to get a range of cells
                 $values = $this->sheet->rangeToArray($coordinate);
 
                 return $values;
-            }
-            else
-            {
+            } else {
                 // We want 1 specific cell
                 return $this->sheet->getCell($coordinate)->getValue();
             }
@@ -155,9 +145,9 @@ protected function getCellValueByCoordinate($coordinate)
     }
 
     /**
-     * Get the coordinates from the config file
-     * @param  string $field
-     * @return string|boolean
+     * Get the coordinates from the config file.
+     * @param  string      $field
+     * @return string|bool
      */
     protected function getCoordinateByKey($field)
     {
@@ -165,7 +155,7 @@ protected function getCoordinateByKey($field)
     }
 
     /**
-     * Dynamically get a value by config
+     * Dynamically get a value by config.
      * @param  string $field
      * @return string
      */
@@ -173,4 +163,4 @@ public function __get($field)
     {
         return $this->valueByIndex($field);
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Readers/HtmlReader.php b/src/Drivers/PHPExcel/Readers/HtmlReader.php
similarity index 73%
rename from src/Maatwebsite/Excel/Readers/HtmlReader.php
rename to src/Drivers/PHPExcel/Readers/HtmlReader.php
index 9d93b57fb..58790dbc5 100644
--- a/src/Maatwebsite/Excel/Readers/HtmlReader.php
+++ b/src/Drivers/PHPExcel/Readers/HtmlReader.php
@@ -1,26 +1,26 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class Html extends PHPExcel_Reader_HTML {
-
+class Html extends PHPExcel_Reader_HTML
+{
     /**
-     * Style per range
+     * Style per range.
      * @var array
      */
-    protected $styles = array();
+    protected $styles = [];
 
-    protected $_dataArray = array();
+    protected $_dataArray = [];
 
-    protected $_nestedColumn = array('A');
+    protected $_nestedColumn = ['A'];
 
     /**
      * @var int
@@ -48,32 +48,32 @@ class Html extends PHPExcel_Reader_HTML {
     protected $_tableLevel = 0;
 
     /**
-     * Input encoding
+     * Input encoding.
      * @var string
      */
     protected $_inputEncoding = 'ANSI';
 
     /**
-     * Sheet index to read
+     * Sheet index to read.
      * @var int
      */
     protected $_sheetIndex = 0;
 
     /**
-     * HTML tags formatting settings
+     * HTML tags formatting settings.
      * @var array
      */
-    protected $_formats = array();
+    protected $_formats = [];
 
     /**
-     * The current colspan
-     * @var integer
+     * The current colspan.
+     * @var int
      */
     protected $spanWidth = 1;
 
     /**
-     * The current rowspan
-     * @var integer
+     * The current rowspan.
+     * @var int
      */
     protected $spanHeight = 1;
 
@@ -92,26 +92,23 @@ public function __construct(CssParser $cssParser)
     }
 
     /**
-     * Loads PHPExcel from file
+     * Loads PHPExcel from file.
      *
-     * @param   string                                 $pFilename
-     * @param   boolean                                $isString
-     * @param bool|LaravelExcelWorksheet|null|PHPExcel $obj
+     * @param  string                                   $pFilename
+     * @param  bool                                     $isString
+     * @param  bool|LaravelExcelWorksheet|null|PHPExcel $obj
      * @throws \PHPExcel_Reader_Exception
-     * @return  LaravelExcelWorksheet
+     * @return LaravelExcelWorksheet
      */
     public function load($pFilename, $isString = false, $obj = false)
     {
         // Set the default style formats
         $this->setStyleFormats();
 
-        if ( $obj instanceof PHPExcel )
-        {
+        if ($obj instanceof PHPExcel) {
             // Load into this instance
             return $this->loadIntoExisting($pFilename, $obj, $isString);
-        }
-        elseif ( $obj instanceof LaravelExcelWorksheet )
-        {
+        } elseif ($obj instanceof LaravelExcelWorksheet) {
             // Load into this instance
             return $this->loadIntoExistingSheet($pFilename, $obj, $isString);
         }
@@ -122,38 +119,35 @@ public function load($pFilename, $isString = false, $obj = false)
     }
 
     /**
-     * Set the style formats from our config file
-     * @return  array
+     * Set the style formats from our config file.
+     * @return array
      */
     protected function setStyleFormats()
     {
-        $this->_formats = Config::get('excel.views.styles', array());
+        $this->_formats = Config::get('excel.views.styles', []);
     }
 
     /**
-     * Loads HTML from file into sheet instance
+     * Loads HTML from file into sheet instance.
      *
-     * @param   string                $pFilename
-     * @param   LaravelExcelWorksheet $sheet
-     * @param   boolean               $isString
-     * @return  LaravelExcelWorksheet
-     * @throws  PHPExcel_Reader_Exception
+     * @param  string                    $pFilename
+     * @param  LaravelExcelWorksheet     $sheet
+     * @param  bool                      $isString
+     * @throws PHPExcel_Reader_Exception
+     * @return LaravelExcelWorksheet
      */
     public function loadIntoExistingSheet($pFilename, LaravelExcelWorksheet $sheet, $isString = false)
     {
         $isHtmlFile = false;
 
         // Check if it's a string or file
-        if ( !$isString )
-        {
+        if (!$isString) {
             // Double check if it's a file
-            if ( is_file($pFilename) )
-            {
+            if (is_file($pFilename)) {
                 $isHtmlFile = true;
                 $this->_openFile($pFilename);
 
-                if ( !$this->_isValidFormat() )
-                {
+                if (!$this->_isValidFormat()) {
                     fclose($this->_fileHandle);
                     throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid HTML file.");
                 }
@@ -166,20 +160,14 @@ public function loadIntoExistingSheet($pFilename, LaravelExcelWorksheet $sheet,
         $dom = new DOMDocument;
 
         // Check if we need to load the file or the HTML
-        if ( $isHtmlFile )
-        {
+        if ($isHtmlFile) {
             // Load HTML from file
-            if ( (version_compare(PHP_VERSION, '5.4.0') >= 0) && defined(LIBXML_DTDLOAD) )
-            {
+            if ((version_compare(PHP_VERSION, '5.4.0') >= 0) && defined(LIBXML_DTDLOAD)) {
                 $loaded = @$dom->loadHTMLFile($pFilename, PHPExcel_Settings::getLibXmlLoaderOptions());
-            }
-            else
-            {
+            } else {
                 $loaded = @$dom->loadHTMLFile($pFilename);
             }
-        }
-        else
-        {
+        } else {
             // Load HTML from string
             @$dom->loadHTML(mb_convert_encoding($pFilename, 'HTML-ENTITIES', 'UTF-8'));
 
@@ -196,44 +184,39 @@ public function loadIntoExistingSheet($pFilename, LaravelExcelWorksheet $sheet,
             $loaded = @$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
         }
 
-        if ( $loaded === false )
-        {
+        if ($loaded === false) {
             throw new PHPExcel_Reader_Exception('Failed to load ' . $pFilename . ' as a DOM Document');
         }
 
         //  Discard white space
         $dom->preserveWhiteSpace = true;
 
-        $row = 0;
-        $column = 'A';
+        $row     = 0;
+        $column  = 'A';
         $content = '';
         $this->_processDomElement($dom, $sheet, $row, $column, $content);
 
-        if ( !$sheet->hasFixedSizeColumns() )
+        if (!$sheet->hasFixedSizeColumns()) {
             $this->autosizeColumn($sheet);
+        }
 
         return $sheet;
     }
 
     /**
-     * Autosize column for document
+     * Autosize column for document.
      * @param  LaravelExcelWorksheet $sheet
      * @return LaravelExcelWorksheet
      */
     public function autosizeColumn($sheet)
     {
-        if ( $columns = $sheet->getAutosize() )
-        {
-            if ( is_array($columns) )
-            {
+        if ($columns = $sheet->getAutosize()) {
+            if (is_array($columns)) {
                 $sheet->setAutoSize($columns);
-            }
-            else
-            {
+            } else {
                 $toCol = $sheet->getHighestColumn();
                 $toCol++;
-                for ($i = 'A'; $i !== $toCol; $i++)
-                {
+                for ($i = 'A'; $i !== $toCol; $i++) {
                     $sheet->getColumnDimension($i)->setAutoSize(true);
                 }
 
@@ -245,49 +228,43 @@ public function autosizeColumn($sheet)
     }
 
     /**
-     * Process the dom element
-     * @param  DOMNode               $element
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $row
-     * @param  integer               $column
-     * @param  string                $cellContent
-     * @return void
+     * Process the dom element.
+     * @param DOMNode               $element
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $row
+     * @param int                   $column
+     * @param string                $cellContent
      */
     protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column, &$cellContent, $format = null)
     {
-        foreach ($element->childNodes as $child)
-        {
+        foreach ($element->childNodes as $child) {
             // If is text
-            if ( $child instanceof DOMText )
-            {
+            if ($child instanceof DOMText) {
                 // get the dom text
                 $domText = preg_replace('/\s+/u', ' ', trim($child->nodeValue));
 
                 //  simply append the text if the cell content is a plain text string
-                if ( is_string($cellContent) )
-                {
+                if (is_string($cellContent)) {
                     $cellContent .= $domText;
                 }
             }
 
             // If is a dom element
-            elseif ( $child instanceof DOMElement )
-            {
-                $attributeArray = array();
+            elseif ($child instanceof DOMElement) {
+                $attributeArray = [];
 
                 // Set row (=parent) styles
-                if ( isset($this->styles[$row]) )
+                if (isset($this->styles[$row])) {
                     $this->parseInlineStyles($sheet, $column, $row, $this->styles[$row]);
+                }
 
                 // Loop through the child's attributes
-                foreach ($child->attributes as $attribute)
-                {
+                foreach ($child->attributes as $attribute) {
                     // Add the attribute to the array
                     $attributeArray[$attribute->name] = $attribute->value;
 
                     // Attribute names
-                    switch ($attribute->name)
-                    {
+                    switch ($attribute->name) {
                         // Colspan
                         case 'width':
                             $this->parseWidth($sheet, $column, $row, $attribute->value);
@@ -326,26 +303,24 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                         case 'style':
                             $this->parseInlineStyles($sheet, $column, $row, $attribute->value);
 
-                            if ( $child->nodeName == 'tr' )
+                            if ($child->nodeName == 'tr') {
                                 $this->styles[$row] = $attribute->value;
+                            }
                             break;
                     }
                 }
 
                 // nodeName
-                switch ($child->nodeName)
-                {
+                switch ($child->nodeName) {
 
                     // Meta tags
                     case 'meta' :
 
                         // Loop through the attributes
-                        foreach ($attributeArray as $attributeName => $attributeValue)
-                        {
+                        foreach ($attributeArray as $attributeName => $attributeValue) {
 
                             // Switch the names
-                            switch ($attributeName)
-                            {
+                            switch ($attributeName) {
                                 // Set input encoding
                                 case 'charset':
                                     $_inputEncoding = $attributeValue;
@@ -375,19 +350,20 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                     case 'b'     :
 
                         // Add space after empty cells
-                        if ( $cellContent > '' )
+                        if ($cellContent > '') {
                             $cellContent .= ' ';
+                        }
 
                         // Continue processing
                         $this->_processDomElement($child, $sheet, $row, $column, $cellContent, $format);
 
                         // Add space after empty cells
-                        if ( $cellContent > '' )
+                        if ($cellContent > '') {
                             $cellContent .= ' ';
+                        }
 
                         // Set the styling
-                        if ( isset($this->_formats[$child->nodeName]) )
-                        {
+                        if (isset($this->_formats[$child->nodeName])) {
                             $sheet->getStyle($column . $row)
                                   ->applyFromArray($this->_formats[$child->nodeName]);
                         }
@@ -404,13 +380,11 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                         ++$row;
 
                         // Set the styling
-                        if ( isset($this->_formats[$child->nodeName]) )
-                        {
+                        if (isset($this->_formats[$child->nodeName])) {
                             $sheet->getStyle($column . $row)->applyFromArray($this->_formats[$child->nodeName]);
                         }
                         // If not, enter cell content
-                        else
-                        {
+                        else {
                             $cellContent = '----------';
                             $this->flushCell($sheet, $column, $row, $cellContent);
                         }
@@ -421,14 +395,12 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                     case 'br' :
 
                         // Add linebreak
-                        if ( $this->_tableLevel > 0 )
-                        {
+                        if ($this->_tableLevel > 0) {
                             $cellContent .= "\n";
                         }
 
                         //  Otherwise flush our existing content and move the row cursor on
-                        else
-                        {
+                        else {
                             $this->flushCell($sheet, $column, $row, $cellContent);
                             ++$row;
                         }
@@ -438,10 +410,8 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                     // Hyperlinks
                     case 'a'  :
 
-                        foreach ($attributeArray as $attributeName => $attributeValue)
-                        {
-                            switch ($attributeName)
-                            {
+                        foreach ($attributeArray as $attributeName => $attributeValue) {
+                            switch ($attributeName) {
                                 case 'href':
 
                                     // Set the url
@@ -450,8 +420,7 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                                           ->setUrl($attributeValue);
 
                                     // Set styling
-                                    if ( isset($this->_formats[$child->nodeName]) )
-                                    {
+                                    if (isset($this->_formats[$child->nodeName])) {
                                         $sheet->getStyle($column . $row)->applyFromArray($this->_formats[$child->nodeName]);
                                     }
 
@@ -476,22 +445,17 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                     case 'ul' :
                     case 'p'  :
 
-                        if ( $this->_tableLevel > 0 )
-                        {
+                        if ($this->_tableLevel > 0) {
                             $cellContent .= "\n";
                             $this->_processDomElement($child, $sheet, $row, $column, $cellContent, $format);
                             $this->flushCell($sheet, $column, $row, $cellContent);
 
                             // Set style
-                            if ( isset($this->_formats[$child->nodeName]) )
-                            {
+                            if (isset($this->_formats[$child->nodeName])) {
                                 $sheet->getStyle($column . $row)->applyFromArray($this->_formats[$child->nodeName]);
                             }
-                        }
-                        else
-                        {
-                            if ( $cellContent > '' )
-                            {
+                        } else {
+                            if ($cellContent > '') {
                                 $this->flushCell($sheet, $column, $row, $cellContent);
                                 $row += 2;
                             }
@@ -499,8 +463,7 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                             $this->flushCell($sheet, $column, $row, $cellContent);
 
                             // Set style
-                            if ( isset($this->_formats[$child->nodeName]) )
-                            {
+                            if (isset($this->_formats[$child->nodeName])) {
                                 $sheet->getStyle($column . $row)->applyFromArray($this->_formats[$child->nodeName]);
                             }
 
@@ -512,16 +475,12 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                     // List istem
                     case 'li'  :
 
-                        if ( $this->_tableLevel > 0 )
-                        {
+                        if ($this->_tableLevel > 0) {
                             //  If we're inside a table, replace with a \n
                             $cellContent .= "\n";
                             $this->_processDomElement($child, $sheet, $row, $column, $cellContent, $format);
-                        }
-                        else
-                        {
-                            if ( $cellContent > '' )
-                            {
+                        } else {
+                            if ($cellContent > '') {
                                 $this->flushCell($sheet, $column, $row, $cellContent);
                             }
 
@@ -542,20 +501,18 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                         // Set the start column
                         $column = $this->_setTableStartColumn($column);
 
-                        if ( $this->_tableLevel > 1 )
+                        if ($this->_tableLevel > 1) {
                             --$row;
+                        }
 
                         $this->_processDomElement($child, $sheet, $row, $column, $cellContent, $format);
 
                         // Release the table start column
                         $column = $this->_releaseTableStartColumn();
 
-                        if ( $this->_tableLevel > 1 )
-                        {
+                        if ($this->_tableLevel > 1) {
                             ++$column;
-                        }
-                        else
-                        {
+                        } else {
                             ++$row;
                         }
 
@@ -596,8 +553,7 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                         $this->_processHeadings($child, $sheet, $row, $column, $cellContent);
 
                         // If we have a colspan, count the right amount of columns, else just 1
-                        for ($w = 0; $w < $this->spanWidth; $w++)
-                        {
+                        for ($w = 0; $w < $this->spanWidth; $w++) {
                             ++$column;
                         }
 
@@ -612,8 +568,7 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
                         $this->flushCell($sheet, $column, $row, $cellContent);
 
                         // If we have a colspan, count the right amount of columns, else just 1
-                        for ($w = 0; $w < $this->spanWidth; $w++)
-                        {
+                        for ($w = 0; $w < $this->spanWidth; $w++) {
                             ++$column;
                         }
 
@@ -623,9 +578,9 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
 
                     // Html Body
                     case 'body' :
-                        $row = 1;
-                        $column = 'A';
-                        $content = '';
+                        $row               = 1;
+                        $column            = 'A';
+                        $content           = '';
                         $this->_tableLevel = 0;
                         $this->_processDomElement($child, $sheet, $row, $column, $cellContent, $format);
                         break;
@@ -639,15 +594,16 @@ protected function _processDomElement(DOMNode $element, $sheet, &$row, &$column,
     }
 
     /**
-     * Set the start column
-     * @param   string $column
-     * @return  string
+     * Set the start column.
+     * @param  string $column
+     * @return string
      */
     protected function _setTableStartColumn($column)
     {
         // Set to a
-        if ( $this->_tableLevel == 0 )
+        if ($this->_tableLevel == 0) {
             $column = 'A';
+        }
 
         ++$this->_tableLevel;
 
@@ -658,7 +614,7 @@ protected function _setTableStartColumn($column)
     }
 
     /**
-     * Get the table start column
+     * Get the table start column.
      * @return string
      */
     protected function _getTableStartColumn()
@@ -667,7 +623,7 @@ protected function _getTableStartColumn()
     }
 
     /**
-     * Release the table start column
+     * Release the table start column.
      * @return array
      */
     protected function _releaseTableStartColumn()
@@ -678,44 +634,39 @@ protected function _releaseTableStartColumn()
     }
 
     /**
-     * Flush the cells
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $cellContent
-     * @return void
+     * Flush the cells.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $cellContent
      */
     protected function flushCell($sheet, $column, $row, &$cellContent)
     {
         // Process merged cells
         list($column, $cellContent) = $this->processMergedCells($sheet, $column, $row, $cellContent);
 
-        if ( is_string($cellContent) )
-        {
+        if (is_string($cellContent)) {
             //  Simple String content
-            if ( trim($cellContent) > '' )
-            {
+            if (trim($cellContent) > '') {
                 //  Only actually write it if there's content in the string
                 //  Write to worksheet to be done here...
                 //  ... we return the cell so we can mess about with styles more easily
 
-                $cell = $sheet->setCellValue($column . $row, $cellContent, true);
+                $cell                            = $sheet->setCellValue($column . $row, $cellContent, true);
                 $this->_dataArray[$row][$column] = $cellContent;
             }
-        }
-        else
-        {
+        } else {
             $this->_dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent;
         }
         $cellContent = (string) '';
     }
 
     /**
-     * Process table headings
+     * Process table headings.
      * @param  string                $child
      * @param  LaravelExcelWorksheet $sheet
      * @param  string                $row
-     * @param  integer               $column
+     * @param  int                   $column
      * @param                        $cellContent
      * @throws \PHPExcel_Exception
      * @return LaravelExcelWorksheet
@@ -725,8 +676,7 @@ protected function _processHeadings($child, $sheet, $row, $column, $cellContent)
         $this->_processDomElement($child, $sheet, $row, $column, $cellContent);
         $this->flushCell($sheet, $column, $row, $cellContent);
 
-        if ( isset($this->_formats[$child->nodeName]) )
-        {
+        if (isset($this->_formats[$child->nodeName])) {
             $sheet->getStyle($column . $row)->applyFromArray($this->_formats[$child->nodeName]);
         }
 
@@ -734,20 +684,19 @@ protected function _processHeadings($child, $sheet, $row, $column, $cellContent)
     }
 
     /**
-     * Insert a image inside the sheet
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $attributes
-     * @return void
+     * Insert a image inside the sheet.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $attributes
      */
     protected function insertImageBySrc($sheet, $column, $row, $attributes)
     {
         // Get attributes
-        $src = $attributes->getAttribute('src');
-        $width = (float) $attributes->getAttribute('width');
+        $src    = $attributes->getAttribute('src');
+        $width  = (float) $attributes->getAttribute('width');
         $height = (float) $attributes->getAttribute('height');
-        $alt = $attributes->getAttribute('alt');
+        $alt    = $attributes->getAttribute('alt');
 
         // init drawing
         $drawing = new PHPExcel_Worksheet_Drawing();
@@ -762,11 +711,13 @@ protected function insertImageBySrc($sheet, $column, $row, $attributes)
         $drawing->setOffsetY(10);
 
         // Set height and width
-        if ( $width > 0 )
+        if ($width > 0) {
             $drawing->setWidth($width);
+        }
 
-        if ( $height > 0 )
+        if ($height > 0) {
             $drawing->setHeight($height);
+        }
 
         // Set cell width based on image
         $this->parseWidth($sheet, $column, $row, $drawing->getWidth() / 3);
@@ -774,25 +725,23 @@ protected function insertImageBySrc($sheet, $column, $row, $attributes)
     }
 
     /**
-     * Set cell data format
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  integer               $width
-     * @return void
-    */
+     * Set cell data format.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param int                   $width
+     */
     protected function parseDataFormat($sheet, $column, $row, $format)
     {
-        $sheet->setColumnFormat([$column.$row => $format]);
+        $sheet->setColumnFormat([$column . $row => $format]);
     }
 
     /**
-     * Set column width
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  integer               $width
-     * @return void
+     * Set column width.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param int                   $width
      */
     protected function parseWidth($sheet, $column, $row, $width)
     {
@@ -800,12 +749,11 @@ protected function parseWidth($sheet, $column, $row, $width)
     }
 
     /**
-     * Set row height
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  integer               $height
-     * @return void
+     * Set row height.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param int                   $height
      */
     protected function parseHeight($sheet, $column, $row, $height)
     {
@@ -813,13 +761,12 @@ protected function parseHeight($sheet, $column, $row, $height)
     }
 
     /**
-     * Parse colspans
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  integer               $spanWidth
-     * @param                        $attributes
-     * @return void
+     * Parse colspans.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param int                   $spanWidth
+     * @param                       $attributes
      */
     protected function parseColSpan($sheet, $column, $row, $spanWidth, $attributes)
     {
@@ -828,8 +775,7 @@ protected function parseColSpan($sheet, $column, $row, $spanWidth, $attributes)
         $this->spanWidth = $spanWidth;
 
         // Find end column letter
-        for ($i = 0; $i < ($spanWidth - 1); $i++)
-        {
+        for ($i = 0; $i < ($spanWidth - 1); $i++) {
             ++$column;
         }
 
@@ -840,10 +786,8 @@ protected function parseColSpan($sheet, $column, $row, $spanWidth, $attributes)
         $range = $startCell . ':' . $endCell;
 
         // Remember css inline styles
-        foreach ($attributes as $attribute)
-        {
-            if ( $attribute->name == 'style' )
-            {
+        foreach ($attributes as $attribute) {
+            if ($attribute->name == 'style') {
                 $this->styles[$range] = $attribute->value;
             }
         }
@@ -853,13 +797,12 @@ protected function parseColSpan($sheet, $column, $row, $spanWidth, $attributes)
     }
 
     /**
-     * Parse colspans
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  integer               $spanHeight
-     * @param                        $attributes
-     * @return void
+     * Parse colspans.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param int                   $spanHeight
+     * @param                       $attributes
      */
     protected function parseRowSpan($sheet, $column, $row, $spanHeight, $attributes)
     {
@@ -871,7 +814,7 @@ protected function parseRowSpan($sheet, $column, $row, $spanHeight, $attributes)
 
         // Set endcell = current row number + spanheight
         $endCell = $column . ($row + $this->spanHeight);
-        $range = $startCell . ':' . $endCell;
+        $range   = $startCell . ':' . $endCell;
 
         // Remember css inline styles
         //foreach($attributes as $attribute)
@@ -887,21 +830,18 @@ protected function parseRowSpan($sheet, $column, $row, $spanHeight, $attributes)
     }
 
     /**
-     * Parse the align
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $value
-     * @return void
+     * Parse the align.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $value
      */
     protected function parseAlign($sheet, $column, $row, $value)
     {
-
         $horizontal = false;
-        $cells = $sheet->getStyle($column . $row);
+        $cells      = $sheet->getStyle($column . $row);
 
-        switch ($value)
-        {
+        switch ($value) {
             case 'center':
                 $horizontal = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
                 break;
@@ -919,28 +859,26 @@ protected function parseAlign($sheet, $column, $row, $value)
                 break;
         }
 
-        if ( $horizontal )
+        if ($horizontal) {
             $cells->getAlignment()->applyFromArray(
-                array('horizontal' => $horizontal)
+                ['horizontal' => $horizontal]
             );
+        }
     }
 
     /**
-     * Parse the valign
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $value
-     * @return void
+     * Parse the valign.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $value
      */
     protected function parseValign($sheet, $column, $row, $value)
     {
-
         $vertical = false;
-        $cells = $sheet->getStyle($column . $row);
+        $cells    = $sheet->getStyle($column . $row);
 
-        switch ($value)
-        {
+        switch ($value) {
             case 'top':
                 $vertical = PHPExcel_Style_Alignment::VERTICAL_TOP;
                 break;
@@ -958,19 +896,19 @@ protected function parseValign($sheet, $column, $row, $value)
                 break;
         }
 
-        if ( $vertical )
+        if ($vertical) {
             $cells->getAlignment()->applyFromArray(
-                array('vertical' => $vertical)
+                ['vertical' => $vertical]
             );
+        }
     }
 
     /**
-     * Parse the inline styles
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $styleTag
-     * @return void
+     * Parse the inline styles.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $styleTag
      */
     protected function parseInlineStyles($sheet, $column, $row, $styleTag)
     {
@@ -981,19 +919,17 @@ protected function parseInlineStyles($sheet, $column, $row, $styleTag)
     }
 
     /**
-     * Parse the styles
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
+     * Parse the styles.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
      * @param                        array @styles
-     * @return void
      */
-    protected function parseCssAttributes($sheet, $column, $row, $styles = array())
+    protected function parseCssAttributes($sheet, $column, $row, $styles = [])
     {
-        foreach ($styles as $tag)
-        {
+        foreach ($styles as $tag) {
             $style = explode(':', $tag);
-            $name = trim(reset($style));
+            $name  = trim(reset($style));
             $value = trim(end($style));
 
             $this->parseCssProperties($sheet, $column, $row, $name, $value);
@@ -1001,19 +937,17 @@ protected function parseCssAttributes($sheet, $column, $row, $styles = array())
     }
 
     /**
-     * Parse CSS
-     * @param  LaravelExcelWorksheet $sheet
-     * @param  string                $column
-     * @param  integer               $row
-     * @param  string                $name
-     * @param  string                $value
-     * @return void
+     * Parse CSS.
+     * @param LaravelExcelWorksheet $sheet
+     * @param string                $column
+     * @param int                   $row
+     * @param string                $name
+     * @param string                $value
      */
     protected function parseCssProperties($sheet, $column, $row, $name, $value)
     {
         $cells = $sheet->getStyle($column . $row);
-        switch ($name)
-        {
+        switch ($name) {
             // Cell width
             case 'width':
                 $this->parseWidth($sheet, $column, $row, $value);
@@ -1033,10 +967,10 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
                 $value = $this->getColor($value);
 
                 $cells->getFill()->applyFromArray(
-                    array(
+                    [
                         'type'  => PHPExcel_Style_Fill::FILL_SOLID,
-                        'color' => array('rgb' => $value)
-                    )
+                        'color' => ['rgb' => $value],
+                    ]
                 );
 
                 break;
@@ -1045,7 +979,7 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
             case 'color':
                 $value = $this->getColor($value);
                 $cells->getFont()->getColor()->applyFromArray(
-                    array('rgb' => $value)
+                    ['rgb' => $value]
                 );
                 break;
 
@@ -1056,27 +990,28 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
 
             // FONT WEIGHT
             case 'font-weight':
-                if ( $value == 'bold' || $value >= 500 )
+                if ($value == 'bold' || $value >= 500) {
                     $cells->getFont()->setBold(true);
+                }
                 break;
 
             // FONT STYLE
             case 'font-style':
-                if ( $value == 'italic' )
+                if ($value == 'italic') {
                     $cells->getFont()->setItalic(true);
+                }
                 break;
 
             // FONT FACE
             case 'font-family':
                 $cells->getFont()->applyFromArray(
-                    array('name' => $value)
+                    ['name' => $value]
                 );
                 break;
 
             // TEXT DECORATION
             case 'text-decoration':
-                switch ($value)
-                {
+                switch ($value) {
                     case 'underline':
                         $cells->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE);
                         break;
@@ -1092,8 +1027,7 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
 
                 $horizontal = false;
 
-                switch ($value)
-                {
+                switch ($value) {
                     case 'center':
                         $horizontal = PHPExcel_Style_Alignment::HORIZONTAL_CENTER;
                         break;
@@ -1111,10 +1045,11 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
                         break;
                 }
 
-                if ( $horizontal )
+                if ($horizontal) {
                     $cells->getAlignment()->applyFromArray(
-                        array('horizontal' => $horizontal)
+                        ['horizontal' => $horizontal]
                     );
+                }
 
                 break;
 
@@ -1123,8 +1058,7 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
 
                 $vertical = false;
 
-                switch ($value)
-                {
+                switch ($value) {
                     case 'top':
                         $vertical = PHPExcel_Style_Alignment::VERTICAL_TOP;
                         break;
@@ -1142,87 +1076,90 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
                         break;
                 }
 
-                if ( $vertical )
+                if ($vertical) {
                     $cells->getAlignment()->applyFromArray(
-                        array('vertical' => $vertical)
+                        ['vertical' => $vertical]
                     );
+                }
                 break;
 
             // Borders
             case 'border':
             case 'borders':
-                $borders = explode(' ', $value);
-                $style = $borders[1];
-                $color = end($borders);
-                $color = $this->getColor($color);
+                $borders     = explode(' ', $value);
+                $style       = $borders[1];
+                $color       = end($borders);
+                $color       = $this->getColor($color);
                 $borderStyle = $this->borderStyle($style);
 
                 $cells->getBorders()->applyFromArray(
-                    array('allborders' => array('style' => $borderStyle, 'color' => array('rgb' => $color)))
+                    ['allborders' => ['style' => $borderStyle, 'color' => ['rgb' => $color]]]
                 );
                 break;
 
             // Border-top
             case 'border-top':
                 $borders = explode(' ', $value);
-                $style = $borders[1];
-                $color = end($borders);
-                $color = $this->getColor($color);
+                $style   = $borders[1];
+                $color   = end($borders);
+                $color   = $this->getColor($color);
 
                 $borderStyle = $this->borderStyle($style);
 
                 $cells->getBorders()->getTop()->applyFromArray(
-                    array('style' => $borderStyle, 'color' => array('rgb' => $color))
+                    ['style' => $borderStyle, 'color' => ['rgb' => $color]]
                 );
                 break;
 
             // Border-bottom
             case 'border-bottom':
-                $borders = explode(' ', $value);
-                $style = $borders[1];
-                $color = end($borders);
-                $color = $this->getColor($color);
+                $borders     = explode(' ', $value);
+                $style       = $borders[1];
+                $color       = end($borders);
+                $color       = $this->getColor($color);
                 $borderStyle = $this->borderStyle($style);
 
                 $cells->getBorders()->getBottom()->applyFromArray(
-                    array('style' => $borderStyle, 'color' => array('rgb' => $color))
+                    ['style' => $borderStyle, 'color' => ['rgb' => $color]]
                 );
                 break;
 
             // Border-right
             case 'border-right':
-                $borders = explode(' ', $value);
-                $style = $borders[1];
-                $color = end($borders);
-                $color = $this->getColor($color);
+                $borders     = explode(' ', $value);
+                $style       = $borders[1];
+                $color       = end($borders);
+                $color       = $this->getColor($color);
                 $borderStyle = $this->borderStyle($style);
 
                 $cells->getBorders()->getRight()->applyFromArray(
-                    array('style' => $borderStyle, 'color' => array('rgb' => $color))
+                    ['style' => $borderStyle, 'color' => ['rgb' => $color]]
                 );
                 break;
 
             // Border-left
             case 'border-left':
-                $borders = explode(' ', $value);
-                $style = $borders[1];
-                $color = end($borders);
-                $color = $this->getColor($color);
+                $borders     = explode(' ', $value);
+                $style       = $borders[1];
+                $color       = end($borders);
+                $color       = $this->getColor($color);
                 $borderStyle = $this->borderStyle($style);
 
                 $cells->getBorders()->getLeft()->applyFromArray(
-                    array('style' => $borderStyle, 'color' => array('rgb' => $color))
+                    ['style' => $borderStyle, 'color' => ['rgb' => $color]]
                 );
                 break;
 
             // wrap-text
             case 'wrap-text':
 
-                if ( $value == 'true' )
+                if ($value == 'true') {
                     $wrap = true;
+                }
 
-                if ( !$value || $value == 'false' )
+                if (!$value || $value == 'false') {
                     $wrap = false;
+                }
 
                 $cells->getAlignment()->setWrapText($wrap);
 
@@ -1235,7 +1172,7 @@ protected function parseCssProperties($sheet, $column, $row, $name, $value)
     }
 
     /**
-     * Get the color
+     * Get the color.
      * @param  string $color
      * @return string
      */
@@ -1244,22 +1181,23 @@ public function getColor($color)
         $color = str_replace('#', '', $color);
 
         // If color is only 3 chars long, mirror it to 6 chars
-        if ( strlen($color) == 3 )
+        if (strlen($color) == 3) {
             $color = $color . $color;
+        }
 
         return $color;
     }
 
     /**
-     * Get the border style
+     * Get the border style.
      * @param  string $style
      * @return string
      */
     public function borderStyle($style)
     {
-        switch ($style)
-        {
+        switch ($style) {
             case 'solid';
+
                 return PHPExcel_Style_Border::BORDER_THIN;
                 break;
 
@@ -1335,17 +1273,14 @@ private function processMergedCells($sheet, &$column, $row, $cellContent)
         $cell = $sheet->getCell($column . $row);
 
         // Get the merged cells
-        foreach ($sheet->getMergeCells() as $mergedCells)
-        {
+        foreach ($sheet->getMergeCells() as $mergedCells) {
             // If cells is in the merged cells range
-            if ( $cell->isInRange($mergedCells) )
-            {
+            if ($cell->isInRange($mergedCells)) {
                 // Get columns
                 preg_match("/(.*):(.*?)/u", $mergedCells, $matches);
 
                 // skip the first item in the merge
-                if ( $matches[1] != $column . $row )
-                {
+                if ($matches[1] != $column . $row) {
                     $newCol = PHPExcel_Cell::stringFromColumnIndex(
                         (PHPExcel_Cell::columnIndexFromString($column) + 1) - 1
                     );
@@ -1353,8 +1288,9 @@ private function processMergedCells($sheet, &$column, $row, $cellContent)
                     $column = $newCol;
 
                     // Set style for merged cells
-                    if ( isset($this->styles[$row]) )
+                    if (isset($this->styles[$row])) {
                         $this->parseInlineStyles($sheet, $column, $row, $this->styles[$row]);
+                    }
 
                     // Flush cell
                     $this->flushCell($sheet, $column, $row, $cellContent);
@@ -1362,6 +1298,6 @@ private function processMergedCells($sheet, &$column, $row, $cellContent)
             }
         }
 
-        return array($column, $cellContent);
+        return [$column, $cellContent];
     }
 }
diff --git a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php b/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
similarity index 83%
rename from src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
rename to src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
index b76aa82a5..b5937de25 100644
--- a/src/Maatwebsite/Excel/Readers/LaravelExcelReader.php
+++ b/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
@@ -1,21 +1,22 @@
- []
+        'registered' => [],
     ];
 
     /**
@@ -227,7 +228,7 @@ class LaravelExcelReader
     protected $dispatcher;
 
     /**
-     * Construct new reader
+     * Construct new reader.
      *
      * @param Filesystem       $filesystem
      * @param FormatIdentifier $identifier
@@ -241,11 +242,11 @@ public function __construct(Filesystem $filesystem, FormatIdentifier $identifier
     }
 
     /**
-     * Load a file
+     * Load a file.
      *
-     * @param  string        $file
-     * @param string|boolean $encoding
-     * @param bool           $noBasePath
+     * @param string      $file
+     * @param string|bool $encoding
+     * @param bool        $noBasePath
      *
      * @return LaravelExcelReader
      */
@@ -271,11 +272,11 @@ public function load($file, $encoding = false, $noBasePath = false, $callbackCon
     }
 
     /**
-     * @param integer|callable|string $sheetID
-     * @param null                    $callback
+     * @param int|callable|string $sheetID
+     * @param null                $callback
      *
-     * @return $this
      * @throws \PHPExcel_Exception
+     * @return $this
      */
     public function sheet($sheetID, $callback = null)
     {
@@ -314,7 +315,7 @@ public function sheet($sheetID, $callback = null)
     }
 
     /**
-     * Set csv delimiter
+     * Set csv delimiter.
      *
      * @param $delimiter
      *
@@ -328,7 +329,7 @@ public function setDelimiter($delimiter)
     }
 
     /**
-     * Set csv enclosure
+     * Set csv enclosure.
      *
      * @param $enclosure
      *
@@ -342,7 +343,7 @@ public function setEnclosure($enclosure)
     }
 
     /**
-     * set selected sheets
+     * set selected sheets.
      *
      * @param array $sheets
      */
@@ -352,9 +353,9 @@ public function setSelectedSheets($sheets)
     }
 
     /**
-     * Check if sheets were selected
+     * Check if sheets were selected.
      *
-     * @return integer
+     * @return int
      */
     public function sheetsSelected()
     {
@@ -362,11 +363,11 @@ public function sheetsSelected()
     }
 
     /**
-     * Check if the file was selected by index
+     * Check if the file was selected by index.
      *
      * @param  $index
      *
-     * @return boolean
+     * @return bool
      */
     public function isSelectedByIndex($index)
     {
@@ -379,7 +380,7 @@ public function isSelectedByIndex($index)
     }
 
     /**
-     * Set the selected sheet indices
+     * Set the selected sheet indices.
      *
      * @param  $sheets
      *
@@ -393,7 +394,7 @@ public function setSelectedSheetIndices($sheets)
     }
 
     /**
-     * Return the selected sheets
+     * Return the selected sheets.
      *
      * @return array
      */
@@ -403,9 +404,9 @@ public function getSelectedSheetIndices()
     }
 
     /**
-     * Remember the results for x minutes
+     * Remember the results for x minutes.
      *
-     * @param  integer $minutes
+     * @param int $minutes
      *
      * @return LaravelExcelReader
      */
@@ -418,10 +419,10 @@ public function remember($minutes)
     }
 
     /**
-     * Read the file through a config file
+     * Read the file through a config file.
      *
-     * @param  string        $config
-     * @param  callback|null $callback
+     * @param string        $config
+     * @param callback|null $callback
      *
      * @return SheetCollection
      */
@@ -433,9 +434,9 @@ public function byConfig($config, $callback = null)
     }
 
     /**
-     * Take x rows
+     * Take x rows.
      *
-     * @param  integer $amount
+     * @param int $amount
      *
      * @return LaravelExcelReader
      */
@@ -448,9 +449,9 @@ public function take($amount)
     }
 
     /**
-     * Skip x rows
+     * Skip x rows.
      *
-     * @param  integer $amount
+     * @param int $amount
      *
      * @return LaravelExcelReader
      */
@@ -463,10 +464,10 @@ public function skip($amount)
     }
 
     /**
-     * Limit the results by x
+     * Limit the results by x.
      *
-     * @param  integer $take
-     * @param  integer $skip
+     * @param int $take
+     * @param int $skip
      *
      * @return LaravelExcelReader
      */
@@ -482,9 +483,9 @@ public function limit($take, $skip = 0)
     }
 
     /**
-     * Select certain columns
+     * Select certain columns.
      *
-     * @param  array $columns
+     * @param array $columns
      *
      * @return LaravelExcelReader
      */
@@ -496,9 +497,9 @@ public function select($columns = [])
     }
 
     /**
-     * Return all sheets/rows
+     * Return all sheets/rows.
      *
-     * @param  array $columns
+     * @param array $columns
      *
      * @return LaravelExcelReader
      */
@@ -508,9 +509,9 @@ public function all($columns = [])
     }
 
     /**
-     * Get first row/sheet only
+     * Get first row/sheet only.
      *
-     * @param  array $columns
+     * @param array $columns
      *
      * @return SheetCollection|RowCollection
      */
@@ -520,7 +521,7 @@ public function first($columns = [])
     }
 
     /**
-     * Get all sheets/rows
+     * Get all sheets/rows.
      *
      * @param array $columns
      *
@@ -544,7 +545,7 @@ public function get($columns = [])
     }
 
     /**
-     * Parse the file in chunks and queues the processing of each chunk
+     * Parse the file in chunks and queues the processing of each chunk.
      *
      * @param int      $size
      * @param callable $callback
@@ -586,9 +587,9 @@ public function chunk($size = 10, callable $callback, $shouldQueue = true)
     }
 
     /**
-     * Each
+     * Each.
      *
-     * @param  callback $callback
+     * @param callback $callback
      *
      * @return SheetCollection|RowCollection
      */
@@ -600,7 +601,7 @@ public function each($callback)
     /**
      *  Parse the file to an array.
      *
-     * @param  array $columns
+     * @param array $columns
      *
      * @return array
      */
@@ -622,10 +623,10 @@ public function toObject($columns = [])
     }
 
     /**
-     *  Dump the parsed file to a readable array
+     *  Dump the parsed file to a readable array.
      *
-     * @param  array   $columns
-     * @param  boolean $die
+     * @param array $columns
+     * @param bool  $die
      *
      * @return string
      */
@@ -637,7 +638,7 @@ public function dump($columns = [], $die = false)
     }
 
     /**
-     * Die and dump
+     * Die and dump.
      *
      * @param array $columns
      *
@@ -649,7 +650,7 @@ public function dd($columns = [])
     }
 
     /**
-     * Init the loading
+     * Init the loading.
      *
      * @param      $file
      * @param bool $encoding
@@ -668,11 +669,9 @@ public function _init($file, $encoding = false, $noBasePath = false)
     }
 
     /**
-     * Inject the excel object
-     *
-     * @param  PHPExcel $excel
+     * Inject the excel object.
      *
-     * @return void
+     * @param PHPExcel $excel
      */
     public function injectExcel($excel)
     {
@@ -681,7 +680,7 @@ public function injectExcel($excel)
     }
 
     /**
-     * Set filters
+     * Set filters.
      *
      * @param array $filters
      */
@@ -699,7 +698,7 @@ public function getFilter()
     }
 
     /**
-     * Enable filters
+     * Enable filters.
      *
      * @return $this
      */
@@ -726,7 +725,7 @@ protected function _enableFilters()
     }
 
     /**
-     * Set the file
+     * Set the file.
      *
      * @param string $file
      * @param bool   $noBasePath
@@ -746,9 +745,9 @@ protected function _setFile($file, $noBasePath = false)
     }
 
     /**
-     * Set the spreadsheet title
+     * Set the spreadsheet title.
      *
-     * @param string|boolean $title
+     * @param string|bool $title
      *
      * @return LaraveExcelReader
      */
@@ -760,9 +759,9 @@ public function setTitle($title = false)
     }
 
     /**
-     * Set extension
+     * Set extension.
      *
-     * @param string|boolean $ext
+     * @param string|bool $ext
      *
      * @return LaraveExcelReader
      */
@@ -774,11 +773,9 @@ public function setExtension($ext = false)
     }
 
     /**
-     * Set custom value binder
+     * Set custom value binder.
      *
-     * @param string|boolean $ext
-     *
-     * @return void
+     * @param string|bool $ext
      */
     public function setValueBinder(PHPExcel_Cell_IValueBinder $binder)
     {
@@ -788,9 +785,7 @@ public function setValueBinder(PHPExcel_Cell_IValueBinder $binder)
     }
 
     /**
-     * Reset the value binder back to default
-     *
-     * @return void
+     * Reset the value binder back to default.
      */
     public function resetValueBinder()
     {
@@ -800,7 +795,7 @@ public function resetValueBinder()
     }
 
     /**
-     * Set the date format
+     * Set the date format.
      *
      * @param bool|string $format The date format
      *
@@ -815,10 +810,10 @@ public function setDateFormat($format = false)
     }
 
     /**
-     * Enable/disable date formating
+     * Enable/disable date formating.
      *
-     * @param  boolean $boolean True/false
-     * @param  boolean $format
+     * @param bool $boolean True/false
+     * @param bool $format
      *
      * @return LaraveExcelReader
      */
@@ -831,7 +826,7 @@ public function formatDates($boolean = true, $format = false)
     }
 
     /**
-     * Set the date columns
+     * Set the date columns.
      *
      * @return LaraveExcelReader
      */
@@ -845,9 +840,9 @@ public function setDateColumns()
     }
 
     /**
-     * If the file has a table heading or not
+     * If the file has a table heading or not.
      *
-     * @param  boolean $boolean
+     * @param bool $boolean
      *
      * @return LaraveExcelReader
      */
@@ -859,7 +854,7 @@ public function noHeading($boolean = true)
     }
 
     /**
-     * Set the cell name word separator
+     * Set the cell name word separator.
      *
      * @param string $separator
      *
@@ -873,11 +868,11 @@ public function setSeparator($separator)
     }
 
     /**
-     * Spelling mistake backwards compatibility
+     * Spelling mistake backwards compatibility.
      *
      * @param  $separator
      *
-     * @return \Maatwebsite\Excel\Readers\LaraveExcelReader
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaraveExcelReader
      */
     public function setSeperator($separator)
     {
@@ -885,7 +880,7 @@ public function setSeperator($separator)
     }
 
     /**
-     *  Set default calculate
+     *  Set default calculate.
      *
      * @param bool $boolean Calculate yes or no
      *
@@ -899,9 +894,9 @@ public function calculate($boolean = true)
     }
 
     /**
-     * Ignore empty cells
+     * Ignore empty cells.
      *
-     * @param  boolean $boolean
+     * @param bool $boolean
      *
      * @return LaraveExcelReader
      */
@@ -913,9 +908,9 @@ public function ignoreEmpty($boolean = true)
     }
 
     /**
-     * Check if the file has een heading
+     * Check if the file has een heading.
      *
-     * @return boolean
+     * @return bool
      */
     public function hasHeading()
     {
@@ -929,7 +924,7 @@ public function hasHeading()
     }
 
     /**
-     * Get the separator
+     * Get the separator.
      *
      * @return string
      */
@@ -943,7 +938,7 @@ public function getSeparator()
     }
 
     /**
-     * Get the dateFormat
+     * Get the dateFormat.
      *
      * @return string
      */
@@ -953,7 +948,7 @@ public function getDateFormat()
     }
 
     /**
-     * Get the date columns
+     * Get the date columns.
      *
      * @return array
      */
@@ -963,9 +958,9 @@ public function getDateColumns()
     }
 
     /**
-     * Check if we need to calculate the formula inside the cell
+     * Check if we need to calculate the formula inside the cell.
      *
-     * @return boolean
+     * @return bool
      */
     public function needsCalculation()
     {
@@ -973,9 +968,9 @@ public function needsCalculation()
     }
 
     /**
-     * Check if we need to ignore the empty cells
+     * Check if we need to ignore the empty cells.
      *
-     * @return boolean
+     * @return bool
      */
     public function needsIgnoreEmpty()
     {
@@ -983,9 +978,9 @@ public function needsIgnoreEmpty()
     }
 
     /**
-     * Check if we need to format the dates
+     * Check if we need to format the dates.
      *
-     * @return boolean
+     * @return bool
      */
     public function needsDateFormatting()
     {
@@ -993,9 +988,9 @@ public function needsDateFormatting()
     }
 
     /**
-     * Return the amount of rows to skip
+     * Return the amount of rows to skip.
      *
-     * @return integer
+     * @return int
      */
     public function getSkip()
     {
@@ -1003,9 +998,9 @@ public function getSkip()
     }
 
     /**
-     * Return the amount of rows to take
+     * Return the amount of rows to take.
      *
-     * @return integer
+     * @return int
      */
     public function getLimit()
     {
@@ -1013,9 +1008,9 @@ public function getLimit()
     }
 
     /**
-     * Get total rows of file
+     * Get total rows of file.
      *
-     * @return integer
+     * @return int
      */
     public function getTotalRowsOfFile()
     {
@@ -1027,7 +1022,7 @@ public function getTotalRowsOfFile()
     }
 
     /**
-     * Get sheet info for active sheet
+     * Get sheet info for active sheet.
      *
      * @return mixed
      */
@@ -1058,9 +1053,9 @@ protected function initClonedExcelObject($clone)
     }
 
     /**
-     * Get the sheet by id or name, else get the active sheet
+     * Get the sheet by id or name, else get the active sheet.
      *
-     * @param callable|integer|string $sheetID
+     * @param callable|int|string $sheetID
      *
      * @return \PHPExcel_Worksheet
      */
@@ -1076,7 +1071,7 @@ protected function getSheetByIdOrName($sheetID)
     }
 
     /**
-     * Get the file title
+     * Get the file title.
      *
      * @return string
      */
@@ -1086,7 +1081,7 @@ public function getTitle()
     }
 
     /**
-     * Get the current filename
+     * Get the current filename.
      *
      * @return mixed
      */
@@ -1096,7 +1091,7 @@ public function getFileName()
     }
 
     /**
-     * Check if the writer has the called method
+     * Check if the writer has the called method.
      *
      * @param $method
      *
@@ -1110,7 +1105,7 @@ protected function writerHasMethod($method)
     }
 
     /**
-     * Init a new writer instance when it doesn't exist yet
+     * Init a new writer instance when it doesn't exist yet.
      */
     protected function initNewWriterWhenNeeded()
     {
@@ -1123,7 +1118,7 @@ protected function initNewWriterWhenNeeded()
     }
 
     /**
-     * Set the write format
+     * Set the write format.
      *
      * @return LaraveExcelReader
      */
@@ -1135,11 +1130,9 @@ protected function _setFormat()
     }
 
     /**
-     * Parse the file
+     * Parse the file.
      *
-     * @param  array $columns
-     *
-     * @return void
+     * @param array $columns
      */
     protected function _parseFile($columns = [])
     {
@@ -1152,7 +1145,7 @@ protected function _parseFile($columns = [])
     }
 
     /**
-     * Set the writer
+     * Set the writer.
      *
      * @return LaraveExcelReader
      */
@@ -1166,9 +1159,9 @@ protected function _setReader()
     }
 
     /**
-     * Set the input encoding
+     * Set the input encoding.
      *
-     * @param boolean $encoding
+     * @param bool $encoding
      *
      * @return LaraveExcelReader
      */
@@ -1184,9 +1177,7 @@ protected function _setInputEncoding($encoding = false)
     }
 
     /**
-     * Set reader defaults
-     *
-     * @return void
+     * Set reader defaults.
      */
     protected function _setReaderDefaults()
     {
@@ -1226,9 +1217,7 @@ protected function _setReaderDefaults()
     }
 
     /**
-     * Reset the writer
-     *
-     * @return void
+     * Reset the writer.
      */
     public function _reset()
     {
@@ -1238,7 +1227,7 @@ public function _reset()
     }
 
     /**
-     * Get excel object
+     * Get excel object.
      *
      * @return PHPExcel
      */
@@ -1248,10 +1237,10 @@ public function getExcel()
     }
 
     /**
-     * Dynamically call methods
+     * Dynamically call methods.
      *
-     * @param  string $method
-     * @param  array  $params
+     * @param string $method
+     * @param array  $params
      *
      * @throws LaravelExcelException
      */
@@ -1271,5 +1260,4 @@ public function __call($method, $params)
 
         throw new LaravelExcelException('[ERROR] Reader method [' . $method . '] does not exist.');
     }
-
 }
diff --git a/src/Drivers/PHPExcel/Writers/CellWriter.php b/src/Drivers/PHPExcel/Writers/CellWriter.php
new file mode 100644
index 000000000..38d2ac628
--- /dev/null
+++ b/src/Drivers/PHPExcel/Writers/CellWriter.php
@@ -0,0 +1,249 @@
+
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
+ */
+class CellWriter
+{
+    /**
+     * Current $sheet.
+     * @var LaravelExcelWorksheet
+     */
+    public $sheet;
+
+    /**
+     * Selected cells.
+     * @var array
+     */
+    public $cells;
+
+    /**
+     * Constructor.
+     * @param array                 $cells
+     * @param LaravelExcelWorksheet $sheet
+     */
+    public function __construct($cells, LaravelExcelWorksheet $sheet)
+    {
+        $this->cells = $cells;
+        $this->sheet = $sheet;
+    }
+
+    /**
+     * Set cell value.
+     * @param  [type]     $value
+     * @return CellWriter
+     */
+    public function setValue($value)
+    {
+        // Only set cell value for single cells
+        if (!str_contains($this->cells, ':')) {
+            $this->sheet->setCellValue($this->cells, $value);
+        }
+
+        return $this;
+    }
+
+    /**
+     * Set the background.
+     * @param  string     $color
+     * @param  string     $type
+     * @param  string     $colorType
+     * @return CellWriter
+     */
+    public function setBackground($color, $type = 'solid', $colorType = 'rgb')
+    {
+        return $this->setColorStyle('fill', $color, $type, $colorType);
+    }
+
+    /**
+     * Set the font color.
+     * @param  string     $color
+     * @param  string     $colorType
+     * @return CellWriter
+     */
+    public function setFontColor($color, $colorType = 'rgb')
+    {
+        return $this->setColorStyle('font', $color, false, $colorType);
+    }
+
+    /**
+     * Set the font.
+     * @param $styles
+     * @return CellWriter
+     */
+    public function setFont($styles)
+    {
+        return $this->setStyle('font', $styles);
+    }
+
+    /**
+     * Set font family.
+     * @param  string     $family
+     * @return CellWriter
+     */
+    public function setFontFamily($family)
+    {
+        return $this->setStyle('font', [
+            'name' => $family,
+        ]);
+    }
+
+    /**
+     * Set font size.
+     * @param  string     $size
+     * @return CellWriter
+     */
+    public function setFontSize($size)
+    {
+        return $this->setStyle('font', [
+            'size' => $size,
+        ]);
+    }
+
+    /**
+     * Set font weight.
+     * @param  bool|string $bold
+     * @return CellWriter
+     */
+    public function setFontWeight($bold = true)
+    {
+        return $this->setStyle('font', [
+            'bold' => ($bold == 'bold' || $bold) ? true : false,
+        ]);
+    }
+
+    /**
+     * Set border.
+     * @param  string      $top
+     * @param  bool|string $right
+     * @param  bool|string $bottom
+     * @param  bool|string $left
+     * @return CellWriter
+     */
+    public function setBorder($top = 'none', $right = 'none', $bottom = 'none', $left = 'none')
+    {
+        // Set the border styles
+        $styles = is_array($top) ? $top : [
+            'top'    => [
+                'style' => $top,
+            ],
+            'left'   => [
+                'style' => $left,
+            ],
+            'right'  => [
+                'style' => $right,
+            ],
+            'bottom' => [
+                'style' => $bottom,
+            ],
+        ];
+
+        return $this->setStyle('borders', $styles);
+    }
+
+    /**
+     * Set the text rotation.
+     * @param  int        $alignment
+     * @return CellWriter
+     */
+    public function setTextRotation($degrees)
+    {
+        $style = $this->getCellStyle()->getAlignment()->setTextRotation($degrees);
+
+        return $this;
+    }
+
+    /**
+     * Set the alignment.
+     * @param  string     $alignment
+     * @return CellWriter
+     */
+    public function setAlignment($alignment)
+    {
+        return $this->setStyle('alignment', [
+            'horizontal' => $alignment,
+        ]);
+    }
+
+    /**
+     * Set vertical alignment.
+     * @param  string     $alignment
+     * @return CellWriter
+     */
+    public function setValignment($alignment)
+    {
+        return $this->setStyle('alignment', [
+            'vertical' => $alignment,
+        ]);
+    }
+
+    /**
+     * Set the text indent.
+     * @param  int        $indent
+     * @return CellWriter
+     */
+    public function setTextIndent($indent)
+    {
+        $style = $this->getCellStyle()->getAlignment()->setIndent((int)$indent);
+
+        return $this;
+    }
+
+    /**
+     * Set the color style.
+     * @param             $styleType
+     * @param  string     $color
+     * @param  bool       $type
+     * @param  string     $colorType
+     * @return CellWriter
+     */
+    protected function setColorStyle($styleType, $color, $type = false, $colorType = 'rgb')
+    {
+        // Set the styles
+        $styles = is_array($color) ? $color : [
+            'type'  => $type,
+            'color' => [$colorType => str_replace('#', '', $color)],
+        ];
+
+        return $this->setStyle($styleType, $styles);
+    }
+
+    /**
+     * Set style.
+     * @param             $styleType
+     * @param  string     $styles
+     * @return CellWriter
+     */
+    protected function setStyle($styleType, $styles)
+    {
+        // Get the cell style
+        $style = $this->getCellStyle();
+
+        // Apply style from array
+        $style->applyFromArray([
+            $styleType => $styles,
+        ]);
+
+        return $this;
+    }
+
+    /**
+     * Get the cell style.
+     * @return \PHPExcel_Style
+     */
+    protected function getCellStyle()
+    {
+        return $this->sheet->getStyle($this->cells);
+    }
+}
diff --git a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php b/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
similarity index 70%
rename from src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
rename to src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
index de976fa98..6c8dd83e7 100644
--- a/src/Maatwebsite/Excel/Writers/LaravelExcelWriter.php
+++ b/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
@@ -1,19 +1,19 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class LaravelExcelWriter {
-
+class LaravelExcelWriter
+{
     /**
-     * Spreadsheet filename
+     * Spreadsheet filename.
      * @var string
      */
     public $filename;
 
     /**
-     * Spreadsheet title
+     * Spreadsheet title.
      * @var string
      */
     public $title;
 
     /**
-     * Excel object
+     * Excel object.
      * @var \PHPExcel
      */
     public $excel;
 
     /**
-     * Laravel response
+     * Laravel response.
      * @var Response
      */
     protected $response;
 
     /**
-     * Spreadsheet writer
+     * Spreadsheet writer.
      * @var object
      */
     public $writer;
 
     /**
-     * Excel sheet
+     * Excel sheet.
      * @var LaravelExcelWorksheet
      */
     protected $sheet;
 
     /**
-     * Parser
+     * Parser.
      * @var ViewParser
      */
     public $parser;
 
     /**
-     * Default extension
+     * Default extension.
      * @var string
      */
     public $ext = 'xls';
 
     /**
-     * Path the file will be stored to
+     * Path the file will be stored to.
      * @var string
      */
     public $storagePath = 'exports';
 
     /**
-     * Header Content-type
+     * Header Content-type.
      * @var string
      */
     protected $contentType;
 
     /**
-     * Spreadsheet is rendered
-     * @var boolean
+     * Spreadsheet is rendered.
+     * @var bool
      */
     protected $rendered = false;
 
     /**
-     * Construct writer
+     * Construct writer.
      * @param Response         $response
      * @param FileSystem       $filesystem
      * @param FormatIdentifier $identifier
      */
     public function __construct(Response $response, FileSystem $filesystem, FormatIdentifier $identifier)
     {
-        $this->response = $response;
+        $this->response   = $response;
         $this->filesystem = $filesystem;
         $this->identifier = $identifier;
     }
 
     /**
-     * Inject the excel object
-     * @param  PHPExcel $excel
-     * @param bool      $reset
-     * @return void
+     * Inject the excel object.
+     * @param PHPExcel $excel
+     * @param bool     $reset
      */
     public function injectExcel($excel, $reset = true)
     {
         $this->excel = $excel;
 
-        if ($reset)
+        if ($reset) {
             $this->_reset();
+        }
     }
 
     /**
-     * Set the spreadsheet title
-     * @param string $title
-     * @return  LaravelExcelWriter
+     * Set the spreadsheet title.
+     * @param  string             $title
+     * @return LaravelExcelWriter
      */
     public function setTitle($title)
     {
@@ -131,7 +131,7 @@ public function setTitle($title)
     }
 
     /**
-     * Set the filename
+     * Set the filename.
      * @param  $name
      * @return $this
      */
@@ -143,7 +143,7 @@ public function setFileName($name)
     }
 
     /**
-     * Get the title
+     * Get the title.
      * @return string
      */
     public function getTitle()
@@ -152,7 +152,7 @@ public function getTitle()
     }
 
     /**
-     * Get the title
+     * Get the title.
      * @return string
      */
     public function getFileName()
@@ -161,13 +161,13 @@ public function getFileName()
     }
 
     /**
-     * Share view with all sheets
-     * @param  string $view
-     * @param  array  $data
-     * @param  array  $mergeData
-     * @return  LaravelExcelWriter
+     * Share view with all sheets.
+     * @param  string             $view
+     * @param  array              $data
+     * @param  array              $mergeData
+     * @return LaravelExcelWriter
      */
-    public function shareView($view, $data = array(), $mergeData = array())
+    public function shareView($view, $data = [], $mergeData = [])
     {
         // Get the parser
         $this->getParser();
@@ -181,28 +181,28 @@ public function shareView($view, $data = array(), $mergeData = array())
     }
 
     /**
-     * Set the view
-     * @return  LaravelExcelWriter
+     * Set the view.
+     * @return LaravelExcelWriter
      */
     public function setView()
     {
-        return call_user_func_array(array($this, 'shareView'), func_get_args());
+        return call_user_func_array([$this, 'shareView'], func_get_args());
     }
 
     /**
-     * Load the view
-     * @return  LaravelExcelWriter
+     * Load the view.
+     * @return LaravelExcelWriter
      */
     public function loadView()
     {
-        return call_user_func_array(array($this, 'shareView'), func_get_args());
+        return call_user_func_array([$this, 'shareView'], func_get_args());
     }
 
     /**
-     * Create a new sheet
-     * @param  string        $title
-     * @param  callback|null $callback
-     * @return  LaravelExcelWriter
+     * Create a new sheet.
+     * @param  string             $title
+     * @param  callback|null      $callback
+     * @return LaravelExcelWriter
      */
     public function sheet($title, $callback = null)
     {
@@ -210,8 +210,9 @@ public function sheet($title, $callback = null)
         $this->sheet = $this->excel->createSheet(null, $title);
 
         // If a parser was set, inject it
-        if ($this->parser)
+        if ($this->parser) {
             $this->sheet->setParser($this->parser);
+        }
 
         // Set the sheet title
         $this->sheet->setTitle($title);
@@ -220,12 +221,14 @@ public function sheet($title, $callback = null)
         $this->sheet->setDefaultPageSetup();
 
         // Do the callback
-        if ($callback instanceof Closure)
+        if ($callback instanceof Closure) {
             call_user_func($callback, $this->sheet);
+        }
 
         // Autosize columns when no user didn't change anything about column sizing
-        if (!$this->sheet->hasFixedSizeColumns())
+        if (!$this->sheet->hasFixedSizeColumns()) {
             $this->sheet->setAutosize(Config::get('excel.export.autosize', false));
+        }
 
         // Parse the sheet
         $this->sheet->parsed();
@@ -234,11 +237,11 @@ public function sheet($title, $callback = null)
     }
 
     /**
-     * Set data for the current sheet
-     * @param  array $array
-     * @return  LaravelExcelWriter
+     * Set data for the current sheet.
+     * @param  array              $array
+     * @return LaravelExcelWriter
      */
-    public function with(Array $array)
+    public function with(array $array)
     {
         // Add the vars
         $this->fromArray($array);
@@ -247,21 +250,19 @@ public function with(Array $array)
     }
 
     /**
-     * Export the spreadsheet
-     * @param string $ext
-     * @param array  $headers
+     * Export the spreadsheet.
+     * @param  string                $ext
+     * @param  array                 $headers
      * @throws LaravelExcelException
      */
-    public function export($ext = 'xls', Array $headers = array())
+    public function export($ext = 'xls', array $headers = [])
     {
         // Set the extension
         $this->ext = $ext;
 
         //Fix borders for merged cells
-        foreach($this->getAllSheets() as $sheet){
-
-            foreach($sheet->getMergeCells() as $cells){
-
+        foreach ($this->getAllSheets() as $sheet) {
+            foreach ($sheet->getMergeCells() as $cells) {
                 $style = $sheet->getStyle(explode(':', $cells)[0]);
 
                 $sheet->duplicateStyle($style, $cells);
@@ -276,30 +277,30 @@ public function export($ext = 'xls', Array $headers = array())
     }
 
     /**
-     * Convert and existing file to newly requested extension
+     * Convert and existing file to newly requested extension.
      * @param       $ext
      * @param array $headers
      */
-    public function convert($ext, Array $headers = array())
+    public function convert($ext, array $headers = [])
     {
         $this->export($ext, $headers);
     }
 
     /**
-     * Export and download the spreadsheet
-     * @param  string $ext
-     * @param array   $headers
+     * Export and download the spreadsheet.
+     * @param string $ext
+     * @param array  $headers
      */
-    public function download($ext = 'xls', Array $headers = array())
+    public function download($ext = 'xls', array $headers = [])
     {
         $this->export($ext, $headers);
     }
 
     /**
-     * Return the spreadsheet file as a string
-     * @param  string $ext
-     * @return string
+     * Return the spreadsheet file as a string.
+     * @param  string                $ext
      * @throws LaravelExcelException
+     * @return string
      */
     public function string($ext = 'xls')
     {
@@ -310,8 +311,9 @@ public function string($ext = 'xls')
         $this->_render();
 
         // Check if writer isset
-        if (!$this->writer)
+        if (!$this->writer) {
             throw new LaravelExcelException('[ERROR] No writer was set.');
+        }
 
         //Capture the content as a string and return it
         ob_start();
@@ -322,29 +324,29 @@ public function string($ext = 'xls')
     }
 
     /**
-     * Download a file
-     * @param array $headers
+     * Download a file.
+     * @param  array                 $headers
      * @throws LaravelExcelException
      */
-    protected function _download(Array $headers = array())
+    protected function _download(array $headers = [])
     {
         // Set the headers
         $this->_setHeaders(
             $headers,
-            array(
+            [
                 'Content-Type'        => $this->contentType,
                 'Content-Disposition' => 'attachment; filename="' . $this->filename . '.' . $this->ext . '"',
                 'Expires'             => 'Mon, 26 Jul 1997 05:00:00 GMT', // Date in the past
                 'Last-Modified'       => Carbon::now()->format('D, d M Y H:i:s'),
                 'Cache-Control'       => 'cache, must-revalidate',
-                'Pragma'              => 'public'
-            )
+                'Pragma'              => 'public',
+            ]
         );
 
         // Check if writer isset
-        if (!$this->writer)
+        if (!$this->writer) {
             throw new LaravelExcelException('[ERROR] No writer was set.');
-
+        }
 
         // Download
         $this->writer->save('php://output');
@@ -354,10 +356,10 @@ protected function _download(Array $headers = array())
     }
 
     /**
-     * Store the excel file to the server
-     * @param  string  $ext
-     * @param  boolean $path
-     * @param  boolean $returnInfo
+     * Store the excel file to the server.
+     * @param  string             $ext
+     * @param  bool               $path
+     * @param  bool               $returnInfo
      * @return LaravelExcelWriter
      */
     public function store($ext = 'xls', $path = false, $returnInfo = false)
@@ -378,16 +380,15 @@ public function store($ext = 'xls', $path = false, $returnInfo = false)
         $this->writer->save($toStore);
 
         // Return file info
-        if ($this->returnInfo($returnInfo))
-        {
+        if ($this->returnInfo($returnInfo)) {
             // Send back information about the stored file
-            return array(
+            return [
                 'full'  => $toStore,
                 'path'  => $this->storagePath,
                 'file'  => $this->filename . '.' . $this->ext,
                 'title' => $this->filename,
-                'ext'   => $this->ext
-            );
+                'ext'   => $this->ext,
+            ];
         }
 
         // Return itself
@@ -395,9 +396,9 @@ public function store($ext = 'xls', $path = false, $returnInfo = false)
     }
 
     /**
-     * Check if we want to return info or itself
-     * @param  boolean $returnInfo
-     * @return boolean
+     * Check if we want to return info or itself.
+     * @param  bool $returnInfo
+     * @return bool
      */
     public function returnInfo($returnInfo = false)
     {
@@ -405,10 +406,10 @@ public function returnInfo($returnInfo = false)
     }
 
     /**
-     *  Store the excel file to the server
-     * @param str|string $ext  The file extension
-     * @param bool|str   $path The save path
-     * @param bool       $returnInfo
+     *  Store the excel file to the server.
+     * @param  str|string         $ext        The file extension
+     * @param  bool|str           $path       The save path
+     * @param  bool               $returnInfo
      * @return LaravelExcelWriter
      */
     public function save($ext = 'xls', $path = false, $returnInfo = false)
@@ -417,15 +418,15 @@ public function save($ext = 'xls', $path = false, $returnInfo = false)
     }
 
     /**
-     * Start render of a new spreadsheet
+     * Start render of a new spreadsheet.
      * @throws LaravelExcelException
-     * @return void
      */
     protected function _render()
     {
         // There should be enough sheets to continue rendering
-        if ($this->excel->getSheetCount() < 0)
+        if ($this->excel->getSheetCount() < 0) {
             throw new LaravelExcelException('[ERROR] Aborting spreadsheet render: no sheets were created.');
+        }
 
         // Set the format
         $this->_setFormat();
@@ -438,7 +439,7 @@ protected function _render()
     }
 
     /**
-     * Get the view parser
+     * Get the view parser.
      * @return PHPExcel
      */
     public function getExcel()
@@ -447,20 +448,21 @@ public function getExcel()
     }
 
     /**
-     * Get the view parser
+     * Get the view parser.
      * @return ViewParser
      */
     public function getParser()
     {
         // Init the parser
-        if (!$this->parser)
+        if (!$this->parser) {
             $this->parser = app('excel.parsers.view');
+        }
 
         return $this->parser;
     }
 
     /**
-     * Get the sheet
+     * Get the sheet.
      * @return LaravelExcelWorksheet
      */
     public function getSheet()
@@ -469,7 +471,7 @@ public function getSheet()
     }
 
     /**
-     * Set attributes
+     * Set attributes.
      * @param string $setter
      * @param array  $params
      */
@@ -479,16 +481,14 @@ protected function _setAttribute($setter, $params)
         $key = lcfirst(str_replace('set', '', $setter));
 
         // If is an allowed property
-        if ($this->excel->isChangeableProperty($setter))
-        {
+        if ($this->excel->isChangeableProperty($setter)) {
             // Set the properties
-            call_user_func_array(array($this->excel->getProperties(), $setter), $params);
+            call_user_func_array([$this->excel->getProperties(), $setter], $params);
         }
     }
 
     /**
-     * Set the write format
-     * @return  void
+     * Set the write format.
      */
     protected function _setFormat()
     {
@@ -503,14 +503,13 @@ protected function _setFormat()
     }
 
     /**
-     * Set the writer
+     * Set the writer.
      * @return PHPExcel_***_Writer
      */
     protected function _setWriter()
     {
         // Set pdf renderer
-        if ($this->format == 'PDF')
-        {
+        if ($this->format == 'PDF') {
             $this->setPdfRenderer();
         }
 
@@ -518,8 +517,7 @@ protected function _setWriter()
         $this->writer = PHPExcel_IOFactory::createWriter($this->excel, $this->format);
 
         // Set CSV delimiter
-        if ($this->format == 'CSV')
-        {
+        if ($this->format == 'CSV') {
             $this->writer->setDelimiter(Config::get('excel.csv.delimiter', ','));
             $this->writer->setEnclosure(Config::get('excel.csv.enclosure', '"'));
             $this->writer->setLineEnding(Config::get('excel::csv.line_ending', "\r\n"));
@@ -527,8 +525,7 @@ protected function _setWriter()
         }
 
         // Set CSV delimiter
-        if ($this->format == 'PDF')
-        {
+        if ($this->format == 'PDF') {
             $this->writer->writeAllSheets();
         }
 
@@ -542,47 +539,48 @@ protected function _setWriter()
     }
 
     /**
-     * Set the pdf renderer
+     * Set the pdf renderer.
      * @throws \Exception
      */
     protected function setPdfRenderer()
     {
         // Get the driver name
         $driver = Config::get('excel.export.pdf.driver');
-        $path = Config::get('excel.export.pdf.drivers.' . $driver . '.path');
+        $path   = Config::get('excel.export.pdf.drivers.' . $driver . '.path');
 
         // Disable autoloading for dompdf
-        if(! defined("DOMPDF_ENABLE_AUTOLOAD")){
+        if (!defined("DOMPDF_ENABLE_AUTOLOAD")) {
             define("DOMPDF_ENABLE_AUTOLOAD", false);
         }
 
         // Set the pdf renderer
-        if (!\PHPExcel_Settings::setPdfRenderer($driver, $path))
+        if (!\PHPExcel_Settings::setPdfRenderer($driver, $path)) {
             throw new \Exception("{$driver} could not be found. Make sure you've included it in your composer.json");
+        }
     }
 
     /**
-     * Set the headers
+     * Set the headers.
      * @param $headers
      * @throws LaravelExcelException
      */
-    protected function _setHeaders(Array $headers = array(), Array $default)
+    protected function _setHeaders(array $headers = [], array $default)
     {
-        if (headers_sent()) throw new LaravelExcelException('[ERROR]: Headers already sent');
+        if (headers_sent()) {
+            throw new LaravelExcelException('[ERROR]: Headers already sent');
+        }
 
         // Merge the default headers with the overruled headers
         $headers = array_merge($default, $headers);
 
-        foreach ($headers as $header => $value)
-        {
+        foreach ($headers as $header => $value) {
             header($header . ': ' . $value);
         }
     }
 
     /**
-     * Set the storage path
+     * Set the storage path.
      * @param bool $path
-     * @return  void
      */
     protected function _setStoragePath($path = false)
     {
@@ -603,8 +601,7 @@ protected function _setStoragePath($path = false)
     }
 
     /**
-     * Reset the writer
-     * @return void
+     * Reset the writer.
      */
     protected function _reset()
     {
@@ -612,27 +609,25 @@ protected function _reset()
     }
 
     /**
-     * Dynamically call methods
-     * @param  string $method
-     * @param  array  $params
+     * Dynamically call methods.
+     * @param  string                $method
+     * @param  array                 $params
      * @throws LaravelExcelException
      * @return LaravelExcelWriter
      */
     public function __call($method, $params)
     {
         // If the dynamic call starts with "set"
-        if (starts_with($method, 'set') && $this->excel->isChangeableProperty($method))
-        {
+        if (starts_with($method, 'set') && $this->excel->isChangeableProperty($method)) {
             $this->_setAttribute($method, $params);
 
             return $this;
         }
 
         // Call a php excel method
-        elseif (method_exists($this->excel, $method))
-        {
+        elseif (method_exists($this->excel, $method)) {
             // Call the method from the excel object with the given params
-            $return = call_user_func_array(array($this->excel, $method), $params);
+            $return = call_user_func_array([$this->excel, $method], $params);
 
             return $return ? $return : $this;
         }
diff --git a/src/Excel.php b/src/Excel.php
new file mode 100644
index 000000000..51c57e7ac
--- /dev/null
+++ b/src/Excel.php
@@ -0,0 +1,91 @@
+app->make(PHPExcel::class);
+    }
+
+    /**
+     * Get the default driver name.
+     *
+     * @return string
+     */
+    public function getDefaultDriver()
+    {
+        return 'phpexcel';
+    }
+}
diff --git a/src/ExcelServiceProvider.php b/src/ExcelServiceProvider.php
new file mode 100644
index 000000000..0ee416a04
--- /dev/null
+++ b/src/ExcelServiceProvider.php
@@ -0,0 +1,69 @@
+
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
+ */
+class ExcelServiceProvider extends ServiceProvider
+{
+    /**
+     * Indicates if loading of the provider is deferred.
+     *
+     * @var bool
+     */
+    protected $defer = true;
+
+    /**
+     * Bootstrap the application events.
+     */
+    public function boot()
+    {
+        $this->publishes([
+            __DIR__ . '/../config/excel.php' => config_path('excel.php'),
+        ]);
+
+        $this->mergeConfigFrom(
+            __DIR__ . '/../config/excel.php', 'excel'
+        );
+    }
+
+    /**
+     * Register the service provider.
+     */
+    public function register()
+    {
+        $this->app->singleton('excel.manager', function ($app) {
+            return new ExcelManager($app);
+        });
+
+        $this->app->alias('excel', Excel::class);
+
+        $this->app->bind('excel', function ($app) {
+            return $app['excel.manager']->driver(
+                $app->config->get('excel.driver')
+            );
+        });
+    }
+
+    /**
+     * Get the services provided by the provider.
+     *
+     * @return array
+     */
+    public function provides()
+    {
+        return [
+            'excel',
+            'excel.manager',
+        ];
+    }
+}
diff --git a/src/Maatwebsite/Excel/Exceptions/LaravelExcelException.php b/src/Exceptions/LaravelExcelException.php
similarity index 71%
rename from src/Maatwebsite/Excel/Exceptions/LaravelExcelException.php
rename to src/Exceptions/LaravelExcelException.php
index 2c85eae78..356accbe3 100644
--- a/src/Maatwebsite/Excel/Exceptions/LaravelExcelException.php
+++ b/src/Exceptions/LaravelExcelException.php
@@ -1,10 +1,11 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class LaravelExcelException extends PHPExcel_Exception {
-
-}
\ No newline at end of file
+class LaravelExcelException extends PHPExcel_Exception
+{
+}
diff --git a/src/Maatwebsite/Excel/Facades/Excel.php b/src/Facades/Excel.php
similarity index 78%
rename from src/Maatwebsite/Excel/Facades/Excel.php
rename to src/Facades/Excel.php
index 395ecfcfc..7c08374e3 100644
--- a/src/Maatwebsite/Excel/Facades/Excel.php
+++ b/src/Facades/Excel.php
@@ -1,10 +1,11 @@
-
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class Excel extends Facade {
-
+class Excel extends Facade
+{
     /**
-     * Return facade accessor
+     * Return facade accessor.
      * @return string
      */
     protected static function getFacadeAccessor()
     {
         return 'excel';
     }
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/Files/ExcelFile.php b/src/Files/ExcelFile.php
similarity index 81%
rename from src/Maatwebsite/Excel/Files/ExcelFile.php
rename to src/Files/ExcelFile.php
index d560b1adb..3d1cf41b3 100644
--- a/src/Maatwebsite/Excel/Files/ExcelFile.php
+++ b/src/Files/ExcelFile.php
@@ -1,11 +1,12 @@
-getFilters() as $filter)
-        {
+        foreach ($this->getFilters() as $filter) {
             // Enable the filter
             $this->excel->filter($filter);
         }
     }
 
     /**
-     * Load base settings
+     * Load base settings.
      */
     protected function loadBaseSettings()
     {
@@ -124,7 +123,7 @@ protected function loadBaseSettings()
     }
 
     /**
-     * Load CSV Settings
+     * Load CSV Settings.
      */
     protected function loadCSVSettings()
     {
@@ -132,19 +131,21 @@ protected function loadCSVSettings()
         $delimiter = $this->getDelimiter();
 
         // Set it when given
-        if($delimiter)
+        if ($delimiter) {
             $this->excel->setDelimiter($delimiter);
+        }
 
         // Get user provided enclosure
         $enclosure = $this->getEnclosure();
 
         // Set it when given
-        if($enclosure)
+        if ($enclosure) {
             $this->excel->setEnclosure($enclosure);
+        }
     }
 
     /**
-     * Dynamically call methods
+     * Dynamically call methods.
      * @param  string $method
      * @param  array  $params
      * @return mixed
diff --git a/src/Files/ExportHandler.php b/src/Files/ExportHandler.php
new file mode 100644
index 000000000..cf62738fb
--- /dev/null
+++ b/src/Files/ExportHandler.php
@@ -0,0 +1,13 @@
+app = $app;
+        $this->app   = $app;
         $this->excel = $excel;
     }
 
     /**
-     * Handle the import/export of the file
+     * Handle the import/export of the file.
      * @param $type
      * @throws LaravelExcelException
      * @return mixed
@@ -49,7 +51,7 @@ public function handle($type)
     }
 
     /**
-     * Get handler
+     * Get handler.
      * @param $type
      * @throws LaravelExcelException
      * @return mixed
@@ -62,7 +64,7 @@ protected function getHandler($type)
     }
 
     /**
-     * Get the file instance
+     * Get the file instance.
      * @return mixed
      */
     public function getFileInstance()
@@ -71,20 +73,21 @@ public function getFileInstance()
     }
 
     /**
-     * Get the handler class name
+     * Get the handler class name.
      * @throws LaravelExcelException
      * @return string
      */
     protected function getHandlerClassName($type)
     {
         // Translate the file into a FileHandler
-        $class = get_class($this);
+        $class   = get_class($this);
         $handler = substr_replace($class, $type . 'Handler', strrpos($class, $type));
 
         // Check if the handler exists
-        if (!class_exists($handler))
+        if (!class_exists($handler)) {
             throw new LaravelExcelException("$type handler [$handler] does not exist.");
+        }
 
         return $handler;
     }
-}
\ No newline at end of file
+}
diff --git a/src/Files/ImportHandler.php b/src/Files/ImportHandler.php
new file mode 100644
index 000000000..887c09692
--- /dev/null
+++ b/src/Files/ImportHandler.php
@@ -0,0 +1,13 @@
+handle( 
-            get_class($this) 
+        return $this->handle(
+            get_class($this)
         );
     }
 
-
     /**
-     * Load the file
-     * @return \Maatwebsite\Excel\Readers\LaravelExcelReader
+     * Load the file.
+     * @return \Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaravelExcelReader
      */
     public function createNewFile()
     {
@@ -47,7 +48,7 @@ public function createNewFile()
     }
 
     /**
-     * Dynamically call methods
+     * Dynamically call methods.
      * @param  string $method
      * @param  array  $params
      * @return mixed
@@ -56,5 +57,4 @@ public function __call($method, $params)
     {
         return call_user_func_array([$this->file, $method], $params);
     }
-
-}
\ No newline at end of file
+}
diff --git a/src/Maatwebsite/Excel/ExcelServiceProvider.php b/src/Maatwebsite/Excel/ExcelServiceProvider.php
deleted file mode 100644
index 88863a5cf..000000000
--- a/src/Maatwebsite/Excel/ExcelServiceProvider.php
+++ /dev/null
@@ -1,249 +0,0 @@
-
- * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
- */
-class ExcelServiceProvider extends ServiceProvider {
-
-    /**
-     * Indicates if loading of the provider is deferred.
-     *
-     * @var bool
-     */
-    protected $defer = false;
-
-    /**
-     * Bootstrap the application events.
-     *
-     * @return void
-     */
-
-    public function boot()
-    {
-        $this->publishes([
-            __DIR__ . '/../../config/excel.php' => config_path('excel.php'),
-        ]);
-
-        $this->mergeConfigFrom(
-            __DIR__ . '/../../config/excel.php', 'excel'
-        );
-
-        //Set the autosizing settings
-        $this->setAutoSizingSettings();
-    }
-
-    /**
-     * Register the service provider.
-     *
-     * @return void
-     */
-    public function register()
-    {
-        $this->bindClasses();
-        $this->bindCssParser();
-        $this->bindReaders();
-        $this->bindParsers();
-        $this->bindPHPExcelClass();
-        $this->bindWriters();
-        $this->bindExcel();
-    }
-
-    /**
-     * Bind PHPExcel classes
-     * @return void
-     */
-    protected function bindPHPExcelClass()
-    {
-        // Set object
-        $me = $this;
-
-        // Bind the PHPExcel class
-        $this->app['phpexcel'] = $this->app->share(function () use ($me)
-        {
-            // Set locale
-            $me->setLocale();
-
-            // Set the caching settings
-            $me->setCacheSettings();
-
-            // Init phpExcel
-            $excel = new PHPExcel();
-            $excel->setDefaultProperties();
-            return $excel;
-        });
-    }
-
-    /**
-     * Bind the css parser
-     */
-    protected function bindCssParser()
-    {
-        // Bind css parser
-        $this->app['excel.parsers.css'] = $this->app->share(function ()
-        {
-            return new CssParser(
-                new CssToInlineStyles()
-            );
-        });
-    }
-
-    /**
-     * Bind writers
-     * @return void
-     */
-    protected function bindReaders()
-    {
-        // Bind the laravel excel reader
-        $this->app['excel.reader'] = $this->app->share(function ($app)
-        {
-            return new LaravelExcelReader(
-                $app['files'],
-                $app['excel.identifier'],
-                $app['Illuminate\Contracts\Bus\Dispatcher']
-            );
-        });
-
-        // Bind the html reader class
-        $this->app['excel.readers.html'] = $this->app->share(function ($app)
-        {
-            return new Html(
-                $app['excel.parsers.css']
-            );
-        });
-    }
-
-    /**
-     * Bind writers
-     * @return void
-     */
-    protected function bindParsers()
-    {
-        // Bind the view parser
-        $this->app['excel.parsers.view'] = $this->app->share(function ($app)
-        {
-            return new ViewParser(
-                $app['excel.readers.html']
-            );
-        });
-    }
-
-    /**
-     * Bind writers
-     * @return void
-     */
-    protected function bindWriters()
-    {
-        // Bind the excel writer
-        $this->app['excel.writer'] = $this->app->share(function ($app)
-        {
-            return new LaravelExcelWriter(
-                $app->make(Response::class),
-                $app['files'],
-                $app['excel.identifier']
-            );
-        });
-    }
-
-    /**
-     * Bind Excel class
-     * @return void
-     */
-    protected function bindExcel()
-    {
-        // Bind the Excel class and inject its dependencies
-        $this->app['excel'] = $this->app->share(function ($app)
-        {
-            $excel = new Excel(
-                $app['phpexcel'],
-                $app['excel.reader'],
-                $app['excel.writer'],
-                $app['excel.parsers.view']
-            );
-
-            $excel->registerFilters($app['config']->get('excel.filters', array()));
-
-            return $excel;
-        });
-        
-        $this->app->alias('phpexcel', PHPExcel::class);
-    }
-
-    /**
-     * Bind other classes
-     * @return void
-     */
-    protected function bindClasses()
-    {
-        // Bind the format identifier
-        $this->app['excel.identifier'] = $this->app->share(function ($app)
-        {
-            return new FormatIdentifier($app['files']);
-        });
-    }
-
-    /**
-     * Set cache settings
-     * @return Cache
-     */
-    public function setCacheSettings()
-    {
-        return new Cache();
-    }
-
-    /**
-     * Set locale
-     */
-    public function setLocale()
-    {
-        $locale = Config::get('app.locale', 'en_us');
-        PHPExcel_Settings::setLocale($locale);
-    }
-
-    /**
-     * Set the autosizing settings
-     */
-    public function setAutoSizingSettings()
-    {
-        $method = Config::get('excel.export.autosize-method', PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX);
-        PHPExcel_Shared_Font::setAutoSizeMethod($method);
-    }
-
-    /**
-     * Get the services provided by the provider.
-     *
-     * @return array
-     */
-    public function provides()
-    {
-        return array(
-            'excel',
-            'phpexcel',
-            'excel.reader',
-            'excel.readers.html',
-            'excel.parsers.view',
-            'excel.writer'
-        );
-    }
-}
diff --git a/src/Maatwebsite/Excel/Files/ExportHandler.php b/src/Maatwebsite/Excel/Files/ExportHandler.php
deleted file mode 100644
index 5f5480436..000000000
--- a/src/Maatwebsite/Excel/Files/ExportHandler.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
- */
-class CellWriter {
-
-    /**
-     * Current $sheet
-     * @var LaravelExcelWorksheet
-     */
-    public $sheet;
-
-    /**
-     * Selected cells
-     * @var array
-     */
-    public $cells;
-
-    /**
-     * Constructor
-     * @param array                 $cells
-     * @param LaravelExcelWorksheet $sheet
-     */
-    public function __construct($cells, LaravelExcelWorksheet $sheet)
-    {
-        $this->cells = $cells;
-        $this->sheet = $sheet;
-    }
-
-    /**
-     * Set cell value
-     * @param [type] $value
-     * @return  CellWriter
-     */
-    public function setValue($value)
-    {
-        // Only set cell value for single cells
-        if (!str_contains($this->cells, ':'))
-        {
-            $this->sheet->setCellValue($this->cells, $value);
-        }
-
-        return $this;
-    }
-
-    /**
-     * Set the background
-     * @param string $color
-     * @param string $type
-     * @param string $colorType
-     * @return  CellWriter
-     */
-    public function setBackground($color, $type = 'solid', $colorType = 'rgb')
-    {
-        return $this->setColorStyle('fill', $color, $type, $colorType);
-    }
-
-    /**
-     * Set the font color
-     * @param string $color
-     * @param string $colorType
-     * @return  CellWriter
-     */
-    public function setFontColor($color, $colorType = 'rgb')
-    {
-        return $this->setColorStyle('font', $color, false, $colorType);
-    }
-
-    /**
-     * Set the font
-     * @param $styles
-     * @return  CellWriter
-     */
-    public function setFont($styles)
-    {
-        return $this->setStyle('font', $styles);
-    }
-
-    /**
-     * Set font family
-     * @param string $family
-     * @return  CellWriter
-     */
-    public function setFontFamily($family)
-    {
-        return $this->setStyle('font', array(
-            'name' => $family
-        ));
-    }
-
-    /**
-     * Set font size
-     * @param  string $size
-     * @return  CellWriter
-     */
-    public function setFontSize($size)
-    {
-        return $this->setStyle('font', array(
-            'size' => $size
-        ));
-    }
-
-    /**
-     * Set font weight
-     * @param  boolean|string $bold
-     * @return  CellWriter
-     */
-    public function setFontWeight($bold = true)
-    {
-        return $this->setStyle('font', array(
-            'bold' => ($bold == 'bold' || $bold) ? true : false
-        ));
-    }
-
-    /**
-     * Set border
-     * @param string      $top
-     * @param bool|string $right
-     * @param bool|string $bottom
-     * @param bool|string $left
-     * @return  CellWriter
-     */
-    public function setBorder($top = 'none', $right = 'none', $bottom = 'none', $left = 'none')
-    {
-        // Set the border styles
-        $styles = is_array($top) ? $top : array(
-            'top'    => array(
-                'style' => $top
-            ),
-            'left'   => array(
-                'style' => $left,
-            ),
-            'right'  => array(
-                'style' => $right,
-            ),
-            'bottom' => array(
-                'style' => $bottom,
-            )
-        );
-
-        return $this->setStyle('borders', $styles);
-    }
-
-    /**
-     * Set the text rotation
-     * @param integer $alignment
-     * @return  CellWriter
-     */
-    public function setTextRotation($degrees)
-    {
-      $style = $this->getCellStyle()->getAlignment()->setTextRotation($degrees);
-      return $this;
-    }
-
-    /**
-     * Set the alignment
-     * @param string $alignment
-     * @return  CellWriter
-     */
-    public function setAlignment($alignment)
-    {
-        return $this->setStyle('alignment', array(
-            'horizontal' => $alignment
-        ));
-    }
-
-    /**
-     * Set vertical alignment
-     * @param string $alignment
-     * @return  CellWriter
-     */
-    public function setValignment($alignment)
-    {
-        return $this->setStyle('alignment', array(
-            'vertical' => $alignment
-        ));
-    }
-
-    /**
-     * Set the text indent
-     * @param integer $indent
-     * @return  CellWriter
-     */
-    public function setTextIndent($indent)
-    {
-      $style = $this->getCellStyle()->getAlignment()->setIndent((int)$indent);
-      return $this;
-    }
-
-    /**
-     * Set the color style
-     * @param         $styleType
-     * @param string  $color
-     * @param boolean $type
-     * @param string  $colorType
-     * @return  CellWriter
-     */
-    protected function setColorStyle($styleType, $color, $type = false, $colorType = 'rgb')
-    {
-        // Set the styles
-        $styles = is_array($color) ? $color : array(
-            'type'  => $type,
-            'color' => array($colorType => str_replace('#', '', $color))
-        );
-
-        return $this->setStyle($styleType, $styles);
-    }
-
-    /**
-     * Set style
-     * @param        $styleType
-     * @param string $styles
-     * @return  CellWriter
-     */
-    protected function setStyle($styleType, $styles)
-    {
-        // Get the cell style
-        $style = $this->getCellStyle();
-
-        // Apply style from array
-        $style->applyFromArray(array(
-            $styleType => $styles
-        ));
-
-        return $this;
-    }
-
-    /**
-     * Get the cell style
-     * @return \PHPExcel_Style
-     */
-    protected function getCellStyle()
-    {
-        return $this->sheet->getStyle($this->cells);
-    }
-}
diff --git a/tests/Collections/CellCollectionTest.php b/tests/Collections/CellCollectionTest.php
index cf8acd2f0..e37d8da62 100644
--- a/tests/Collections/CellCollectionTest.php
+++ b/tests/Collections/CellCollectionTest.php
@@ -1,53 +1,47 @@
 collection = new CellCollection([
             'one' => 'one',
-            'two' => 'two'
+            'two' => 'two',
         ]);
     }
 
-
     public function testSetItems()
     {
         $this->collection->setItems([
-            'three' => 'three'
+            'three' => 'three',
         ]);
 
         $this->assertContains('three', $this->collection);
         $this->assertCount(3, $this->collection);
     }
 
-
     public function testDynamicGetters()
     {
         $this->assertEquals('two', $this->collection->two);
     }
 
-
     public function testIsset()
     {
         $this->assertTrue(isset($this->collection->two));
         $this->assertFalse(isset($this->collection->nonexisting));
     }
 
-
     public function testEmpty()
     {
         $this->assertFalse(empty($this->collection->two));
         $this->assertTrue(empty($this->collection->nonexisting));
     }
 
-
     public function testDynamicCheck()
     {
         $this->assertTrue($this->collection->two ? true : false);
         $this->assertFalse($this->collection->nonexisting ? true : false);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Excel/ExcelTestCase.php b/tests/Excel/ExcelTestCase.php
index 9fd267c87..fe8a1ba36 100644
--- a/tests/Excel/ExcelTestCase.php
+++ b/tests/Excel/ExcelTestCase.php
@@ -1,13 +1,12 @@
 phpexcel = m::mock('Maatwebsite\Excel\Classes\PHPExcel');
+        $this->phpexcel = m::mock('Maatwebsite\Excel\Drivers\PHPExcel\Classes\PHPExcel');
         $this->phpexcel->shouldReceive('getID');
         $this->phpexcel->shouldReceive('disconnectWorksheets');
         $this->phpexcel->shouldReceive('setDefaultProperties');
     }
 
     /**
-     * Mock Reader class
+     * Mock Reader class.
      * @return [type] [description]
      */
     public function mockReader()
     {
-        $this->reader = m::mock('Maatwebsite\Excel\Readers\LaravelExcelReader');
+        $this->reader = m::mock('Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaravelExcelReader');
         $this->reader->shouldReceive('injectExcel')->with($this->phpexcel);
         $this->reader->shouldReceive('load');
         $this->reader->shouldReceive('setSelectedSheets');
@@ -77,12 +76,12 @@ public function mockReader()
     }
 
     /**
-     * Mock Writer class
+     * Mock Writer class.
      * @return [type] [description]
      */
     public function mockWriter()
     {
-        $this->writer = m::mock('Maatwebsite\Excel\Writers\LaravelExcelWriter');
+        $this->writer = m::mock('Maatwebsite\Excel\Drivers\PHPExcel\Writers\LaravelExcelWriter');
         $this->writer->shouldReceive('injectExcel')->with($this->phpexcel);
         $this->writer->shouldReceive('setTitle');
         $this->writer->shouldReceive('setFileName');
@@ -90,22 +89,21 @@ public function mockWriter()
     }
 
     /**
-     * Mock Writer class
+     * Mock Writer class.
      * @return [type] [description]
      */
     public function mockBatch()
     {
-        $this->batch = m::mock('Maatwebsite\Excel\Readers\Batch');
+        $this->batch = m::mock('Maatwebsite\Excel\Drivers\PHPExcel\Readers\Batch');
         $this->batch->shouldReceive('start')->andReturn('foo');
     }
 
     /**
-     * Teardown
+     * Teardown.
      * @return [type] [description]
      */
     public function tearDown()
     {
         m::close();
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Excel/ExcelTester.php b/tests/Excel/ExcelTester.php
index 67ef74351..fc3132098 100644
--- a/tests/Excel/ExcelTester.php
+++ b/tests/Excel/ExcelTester.php
@@ -1,46 +1,45 @@
 excel->selectSheets(array('sheet'));
+        $selected = $this->excel->selectSheets(['sheet']);
         $this->assertEquals($this->excel, $selected);
     }
 
     /**
-     * Test select sheets
+     * Test select sheets.
      * @return
      */
     public function testSelectSheetsByIndex()
     {
-        $selected = $this->excel->selectSheetsByIndex(array('0'));
+        $selected = $this->excel->selectSheetsByIndex(['0']);
         $this->assertEquals($this->excel, $selected);
     }
 
     /**
-     * Test the share view
+     * Test the share view.
      * @return
      */
     public function testShareView()
     {
-        $selected = $this->excel->shareView('filename', array('test'), array('test'));
+        $selected = $this->excel->shareView('filename', ['test'], ['test']);
         $this->assertEquals($this->writer, $selected);
     }
 
     /**
-     * Test load view
+     * Test load view.
      * @return
      */
     public function testLoadView()
     {
-        $selected = $this->excel->loadView('filename', array('test'), array('test'));
+        $selected = $this->excel->loadView('filename', ['test'], ['test']);
         $this->assertEquals($this->writer, $selected);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Files/CsvExcelFileTest.php b/tests/Files/CsvExcelFileTest.php
index df6784f27..4f8f31269 100644
--- a/tests/Files/CsvExcelFileTest.php
+++ b/tests/Files/CsvExcelFileTest.php
@@ -2,23 +2,20 @@
 
 include_once 'classes/CsvTestImport.php';
 
-class CsvExcelFileTest extends TestCase {
-
-
+class CsvExcelFileTest extends TestCase
+{
     public function testInit()
     {
         $importer = app('CsvTestImport');
         $this->assertInstanceOf('Maatwebsite\Excel\Files\ExcelFile', $importer);
     }
 
-
     public function testGetResultsDirectlyWithCustomDelimiterSetAsProperty()
     {
         $importer = app('TestImport');
-        $results = $importer->get();
+        $results  = $importer->get();
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $results);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $results);
         $this->assertCount(5, $results);
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Files/ExcelFileTest.php b/tests/Files/ExcelFileTest.php
index 386354214..88f9f0ee7 100644
--- a/tests/Files/ExcelFileTest.php
+++ b/tests/Files/ExcelFileTest.php
@@ -5,27 +5,24 @@
 include_once 'classes/TestFile.php';
 include_once 'classes/TestFileHandler.php';
 
-class ExcelFileTest extends TestCase {
-
-
+class ExcelFileTest extends TestCase
+{
     public function testInit()
     {
         $importer = app('TestImport');
         $this->assertInstanceOf('Maatwebsite\Excel\Files\ExcelFile', $importer);
     }
 
-
     public function testGetFile()
     {
         $importer = app('TestImport');
-        $file = $importer->getFile();
-        $exploded = explode('/',$file);
+        $file     = $importer->getFile();
+        $exploded = explode('/', $file);
         $filename = end($exploded);
 
         $this->assertEquals('test.csv', $filename);
     }
 
-
     public function testGetFilters()
     {
         $importer = app('TestImport');
@@ -33,38 +30,34 @@ public function testGetFilters()
         $this->assertContains('chunk', $importer->getFileInstance()->filters['enabled']);
     }
 
-
     public function testLoadFile()
     {
         $importer = app('TestImport');
         $importer->loadFile();
-        $this->assertInstanceOf('Maatwebsite\Excel\Readers\LaravelExcelReader', $importer->getFileInstance());
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaravelExcelReader', $importer->getFileInstance());
     }
 
-
     public function testGetResultsDirectly()
     {
         $importer = app('TestImport');
-        $results = $importer->get();
+        $results  = $importer->get();
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $results);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $results);
         $this->assertCount(5, $results);
     }
 
-
     public function testImportHandler()
     {
         $importer = app('TestImport');
-        $results = $importer->handleImport();
+        $results  = $importer->handleImport();
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $results);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $results);
         $this->assertCount(5, $results);
 
         $importer = app('TestFile');
-        $results = $importer->handleImport();
+        $results  = $importer->handleImport();
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $results);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $results);
         $this->assertCount(5, $results);
     }
-
 }
diff --git a/tests/Files/NewExcelFileTest.php b/tests/Files/NewExcelFileTest.php
index 80f7a61a7..72dd80733 100644
--- a/tests/Files/NewExcelFileTest.php
+++ b/tests/Files/NewExcelFileTest.php
@@ -5,31 +5,27 @@
 include_once 'classes/TestNewFile.php';
 include_once 'classes/TestNewFileHandler.php';
 
-class NewExcelFileTest extends TestCase {
-
-
+class NewExcelFileTest extends TestCase
+{
     public function testInit()
     {
         $exporter = app('TestExport');
         $this->assertInstanceOf('Maatwebsite\Excel\Files\NewExcelFile', $exporter);
     }
 
-
     public function testGetFilename()
     {
         $exporter = app('TestExport');
         $this->assertEquals('test-file', $exporter->getFilename());
     }
 
-
     public function testCreateNewFile()
     {
         $exporter = app('TestExport');
         $exporter->createNewFile();
-        $this->assertInstanceOf('Maatwebsite\Excel\Writers\LaravelExcelWriter', $exporter->getFileInstance());
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Writers\LaravelExcelWriter', $exporter->getFileInstance());
     }
 
-
     public function testDirectUsage()
     {
         $exporter = app('TestExport');
@@ -38,18 +34,16 @@ public function testDirectUsage()
         $this->assertEquals('New title', $exporter->getFileInstance()->getTitle());
     }
 
-
     public function testExportHandler()
     {
         $exporter = app('TestExport');
-        $result = $exporter->handleExport();
+        $result   = $exporter->handleExport();
 
         $this->assertEquals('exported', $result);
 
         $exporter = app('TestNewFile');
-        $result = $exporter->handleExport();
+        $result   = $exporter->handleExport();
 
         $this->assertEquals('exported', $result);
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Files/classes/CsvTestImport.php b/tests/Files/classes/CsvTestImport.php
index 345511474..417abadd2 100644
--- a/tests/Files/classes/CsvTestImport.php
+++ b/tests/Files/classes/CsvTestImport.php
@@ -2,20 +2,20 @@
 
 use Maatwebsite\Excel\Files\ExcelFile;
 
-class CsvTestImport extends ExcelFile {
-
+class CsvTestImport extends ExcelFile
+{
     /**
-     * Custom delimiter
+     * Custom delimiter.
      * @var string
      */
     protected $delimiter  = ';';
 
     /**
-     * Get file to import
+     * Get file to import.
      * @return string
      */
     public function getFile()
     {
         return __DIR__ . '/../files/test-custom.csv';
     }
-} 
\ No newline at end of file
+}
diff --git a/tests/Files/classes/TestExport.php b/tests/Files/classes/TestExport.php
index 9a6233067..627d79e20 100644
--- a/tests/Files/classes/TestExport.php
+++ b/tests/Files/classes/TestExport.php
@@ -2,15 +2,14 @@
 
 use Maatwebsite\Excel\Files\NewExcelFile;
 
-class TestExport extends NewExcelFile {
-
+class TestExport extends NewExcelFile
+{
     /**
-     * Get file to import
+     * Get file to import.
      * @return string
      */
     public function getFilename()
     {
         return 'test-file';
     }
-
-} 
\ No newline at end of file
+}
diff --git a/tests/Files/classes/TestExportHandler.php b/tests/Files/classes/TestExportHandler.php
index 6b2297660..ef5a1487a 100644
--- a/tests/Files/classes/TestExportHandler.php
+++ b/tests/Files/classes/TestExportHandler.php
@@ -2,10 +2,10 @@
 
 use Maatwebsite\Excel\Files\ExportHandler;
 
-class TestExportHandler implements ExportHandler {
-
+class TestExportHandler implements ExportHandler
+{
     /**
-     * Handle
+     * Handle.
      * @param $file
      * @return mixed|void
      */
@@ -13,5 +13,4 @@ public function handle($file)
     {
         return 'exported';
     }
-
-} 
\ No newline at end of file
+}
diff --git a/tests/Files/classes/TestFile.php b/tests/Files/classes/TestFile.php
index 5329cc849..d225e817a 100644
--- a/tests/Files/classes/TestFile.php
+++ b/tests/Files/classes/TestFile.php
@@ -2,14 +2,14 @@
 
 use Maatwebsite\Excel\Files\ExcelFile;
 
-class TestFile extends ExcelFile {
-
+class TestFile extends ExcelFile
+{
     protected $delimiter  = ',';
     protected $enclosure  = '"';
     protected $lineEnding = '\r\n';
 
     /**
-     * Get file to import
+     * Get file to import.
      * @return string
      */
     public function getFile()
@@ -18,14 +18,13 @@ public function getFile()
     }
 
     /**
-     * Get filters
+     * Get filters.
      * @return array
      */
     public function getFilters()
     {
         return [
-            'chunk'
+            'chunk',
         ];
     }
-
-} 
+}
diff --git a/tests/Files/classes/TestFileHandler.php b/tests/Files/classes/TestFileHandler.php
index e07d6efd4..c1bb1d228 100644
--- a/tests/Files/classes/TestFileHandler.php
+++ b/tests/Files/classes/TestFileHandler.php
@@ -2,10 +2,10 @@
 
 use Maatwebsite\Excel\Files\ImportHandler;
 
-class TestFileHandler implements ImportHandler {
-
+class TestFileHandler implements ImportHandler
+{
     /**
-     * Handle
+     * Handle.
      * @param $file
      * @return mixed|void
      */
@@ -13,5 +13,4 @@ public function handle($file)
     {
         return $file->get();
     }
-
-} 
+}
diff --git a/tests/Files/classes/TestImport.php b/tests/Files/classes/TestImport.php
index ce49a7952..08cb79d86 100644
--- a/tests/Files/classes/TestImport.php
+++ b/tests/Files/classes/TestImport.php
@@ -2,14 +2,14 @@
 
 use Maatwebsite\Excel\Files\ExcelFile;
 
-class TestImport extends ExcelFile {
-
+class TestImport extends ExcelFile
+{
     protected $delimiter  = ',';
     protected $enclosure  = '"';
     protected $lineEnding = '\r\n';
 
     /**
-     * Get file to import
+     * Get file to import.
      * @return string
      */
     public function getFile()
@@ -18,14 +18,13 @@ public function getFile()
     }
 
     /**
-     * Get filters
+     * Get filters.
      * @return array
      */
     public function getFilters()
     {
         return [
-            'chunk'
+            'chunk',
         ];
     }
-
-} 
\ No newline at end of file
+}
diff --git a/tests/Files/classes/TestImportHandler.php b/tests/Files/classes/TestImportHandler.php
index 5896f8219..d281f8d9a 100644
--- a/tests/Files/classes/TestImportHandler.php
+++ b/tests/Files/classes/TestImportHandler.php
@@ -2,10 +2,10 @@
 
 use Maatwebsite\Excel\Files\ImportHandler;
 
-class TestImportHandler implements ImportHandler {
-
+class TestImportHandler implements ImportHandler
+{
     /**
-     * Handle
+     * Handle.
      * @param $file
      * @return mixed|void
      */
@@ -13,5 +13,4 @@ public function handle($file)
     {
         return $file->get();
     }
-
-} 
+}
diff --git a/tests/Files/classes/TestNewFile.php b/tests/Files/classes/TestNewFile.php
index ee113b653..0c487c723 100644
--- a/tests/Files/classes/TestNewFile.php
+++ b/tests/Files/classes/TestNewFile.php
@@ -2,15 +2,14 @@
 
 use Maatwebsite\Excel\Files\NewExcelFile;
 
-class TestNewFile extends NewExcelFile {
-
+class TestNewFile extends NewExcelFile
+{
     /**
-     * Get file to import
+     * Get file to import.
      * @return string
      */
     public function getFilename()
     {
         return 'test-file';
     }
-
-} 
+}
diff --git a/tests/Files/classes/TestNewFileHandler.php b/tests/Files/classes/TestNewFileHandler.php
index 723c8a558..7805ea31a 100644
--- a/tests/Files/classes/TestNewFileHandler.php
+++ b/tests/Files/classes/TestNewFileHandler.php
@@ -2,10 +2,10 @@
 
 use Maatwebsite\Excel\Files\ExportHandler;
 
-class TestNewFileHandler implements ExportHandler {
-
+class TestNewFileHandler implements ExportHandler
+{
     /**
-     * Handle
+     * Handle.
      * @param $file
      * @return mixed|void
      */
@@ -13,5 +13,4 @@ public function handle($file)
     {
         return 'exported';
     }
-
-} 
\ No newline at end of file
+}
diff --git a/tests/Filters/ChunkReadFilterTest.php b/tests/Filters/ChunkReadFilterTest.php
index 0c4b4c650..7fbe9b4e6 100644
--- a/tests/Filters/ChunkReadFilterTest.php
+++ b/tests/Filters/ChunkReadFilterTest.php
@@ -1,10 +1,8 @@
   'ChunkFilter'
-        );
+        $toRegister = [
+            'chunk' => 'ChunkFilter',
+        ];
 
         $excel = $this->excel->registerFilters($toRegister);
 
@@ -32,20 +31,19 @@ public function testOnlyRegister()
 
     public function testRegisterAndEnabled()
     {
-        $toRegister = array(
-            'registered'    =>  array(
-                'chunk' =>  'ChunkFilter'
-            ),
-            'enabled'   =>  array(
-                'chunk'
-            )
-        );
+        $toRegister = [
+            'registered'    => [
+                'chunk' => 'ChunkFilter',
+            ],
+            'enabled'   => [
+                'chunk',
+            ],
+        ];
 
         $excel = $this->excel->registerFilters($toRegister);
 
         $filters = $this->excel->getFilters();
         $this->assertEquals($toRegister, $filters);
-
     }
 
     public function testEnableOneFilter()
@@ -58,7 +56,7 @@ public function testEnableOneFilter()
 
     public function testEnableMultipleFilter()
     {
-        $excel = $this->excel->filter(array('chunk', 'range'));
+        $excel = $this->excel->filter(['chunk', 'range']);
 
         $filters = $this->excel->getFilters('enabled');
         $this->assertContains('chunk', $filters);
@@ -70,10 +68,9 @@ public function testEnableFilterAndOverruleFilterClass()
         $excel = $this->excel->filter('chunk', 'ChunkFilter');
 
         $registered = $this->excel->getFilters('registered');
-        $this->assertEquals(array('chunk' => 'ChunkFilter'), $registered);
+        $this->assertEquals(['chunk' => 'ChunkFilter'], $registered);
 
         $enabled    = $this->excel->getFilters('enabled');
         $this->assertContains('chunk', $enabled);
-
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Filters/files/sample.csv b/tests/Filters/files/sample.csv
index 6da7ade80..dd3cfbace 100644
--- a/tests/Filters/files/sample.csv
+++ b/tests/Filters/files/sample.csv
@@ -1,16 +1,16 @@
-HEADER
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
+HEADER
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
 15
\ No newline at end of file
diff --git a/tests/Readers/ChineseXlsReaderTest.php b/tests/Readers/ChineseXlsReaderTest.php
index c83f11152..01cdd20a6 100644
--- a/tests/Readers/ChineseXlsReaderTest.php
+++ b/tests/Readers/ChineseXlsReaderTest.php
@@ -1,25 +1,22 @@
 loadedXls->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $got);
         $this->assertCount(2, $got);
     }
 
-
     /**
-     * Test toArray
+     * Test toArray.
      * @return [type] [description]
      */
     public function testToArray()
     {
         $array = $this->loadedXls->toArray();
-        $this->assertEquals(array(
+        $this->assertEquals([
 
-            array(
+            [
                 '商品編號'  => 'L01A01SY047',
                 '商品名稱'  => 'LED T8燈管',
                 '實際數量'  => 1,
-            ),
-            array(
+            ],
+            [
                 '商品編號'  => 'L01A01SY046',
                 '商品名稱'  => 'LED T8燈管',
                 '實際數量'  => 1,
-            )
+            ],
 
-        ), $array);
+        ], $array);
     }
 
     /**
-     * Load a csv file
+     * Load a csv file.
      * @return [type] [description]
      */
     protected function loadChineseXls()
@@ -96,5 +92,4 @@ protected function loadChineseXls()
         // Loaded csv
         $this->loadedXls = $this->reader->load($this->xls);
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/CsvReaderTest.php b/tests/Readers/CsvReaderTest.php
index 71c1bc288..5ed1fbb6d 100644
--- a/tests/Readers/CsvReaderTest.php
+++ b/tests/Readers/CsvReaderTest.php
@@ -3,37 +3,30 @@
 require_once('traits/ImportTrait.php');
 require_once('traits/SingleImportTestingTrait.php');
 
-use Mockery as m;
-use Maatwebsite\Excel\Readers\LaravelExcelReader;
-use Maatwebsite\Excel\Classes;
-
-class CsvReaderTest extends TestCase {
-
+class CsvReaderTest extends TestCase
+{
     /**
-     * Import trait
+     * Import trait.
      */
     use ImportTrait, SingleImportTestingTrait;
 
     /**
-     * Filename
+     * Filename.
      * @var string
      */
     protected $fileName = 'files/test.csv';
 
-
     public function testSeparator()
     {
         $this->assertEquals('_', $this->loadedFile->getSeparator());
     }
 
-
     public function testSetSeparator()
     {
         $set = $this->loadedFile->setSeparator('-');
         $this->assertEquals('-', $set->getSeparator());
     }
 
-
     public function testSetDelimiter()
     {
         $this->loadedFile->setDelimiter(';');
@@ -41,11 +34,10 @@ public function testSetDelimiter()
         $this->assertEquals(';', $this->loadedFile->getDelimiter());
     }
 
-
     public function testSetEnclosure()
     {
         $this->loadedFile->setEnclosure('d');
         $this->reload();
         $this->assertEquals('d', $this->loadedFile->getEnclosure());
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/CustomValueBinderTest.php b/tests/Readers/CustomValueBinderTest.php
index 6e236bbf2..91c6733c2 100644
--- a/tests/Readers/CustomValueBinderTest.php
+++ b/tests/Readers/CustomValueBinderTest.php
@@ -1,9 +1,9 @@
 loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $got);
         $this->assertCount(5, $got);
     }
 
@@ -82,7 +82,7 @@ public function testBoolean()
     }
 
     /**
-     * Load a csv file
+     * Load a csv file.
      * @return [type] [description]
      */
     protected function loadFile()
@@ -103,4 +103,4 @@ public function bindValue(PHPExcel_Cell $cell, $value = null)
 
         return true;
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/MultipleSheetsXlsReaderTest.php b/tests/Readers/MultipleSheetsXlsReaderTest.php
index 8e02ff337..13db5d648 100644
--- a/tests/Readers/MultipleSheetsXlsReaderTest.php
+++ b/tests/Readers/MultipleSheetsXlsReaderTest.php
@@ -2,36 +2,32 @@
 
 require_once('traits/ImportTrait.php');
 
-use Mockery as m;
-use Maatwebsite\Excel\Readers\LaravelExcelReader;
-use Maatwebsite\Excel\Classes;
-
-class MultipleSheetsXlsReaderTest extends TestCase {
-
+class MultipleSheetsXlsReaderTest extends TestCase
+{
     /**
-     * Import trait
+     * Import trait.
      */
     use ImportTrait;
 
     /**
-     * Filename
+     * Filename.
      * @var string
      */
     protected $fileName = 'files/multiple.xls';
 
     /**
-     * Test get
+     * Test get.
      * @return [type] [description]
      */
     public function testGet()
     {
         $got = $this->loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\SheetCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\SheetCollection', $got);
         $this->assertCount(2, $got);
     }
 
     /**
-     * Test get
+     * Test get.
      * @return [type] [description]
      */
     public function testGetAndGetFirstSheetName()
@@ -56,29 +52,29 @@ public function testSelectSheet()
         $sheet = $this->loadedFile->get();
 
         $this->assertEquals('Sheet2', $sheet->getTitle());
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $sheet);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $sheet);
         $this->assertCount(5, $sheet);
     }
 
     public function testSelectSheetByIndex()
     {
-        $this->reader->setSelectedSheetIndices(array(1));
+        $this->reader->setSelectedSheetIndices([1]);
         $this->reload();
 
         $sheet = $this->loadedFile->get();
 
         $this->assertEquals('Sheet2', $sheet->getTitle());
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $sheet);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $sheet);
         $this->assertCount(5, $sheet);
     }
 
     public function testSelectMultipleSheets()
     {
-        $this->reader->setSelectedSheets(array('Sheet1', 'Sheet2'));
+        $this->reader->setSelectedSheets(['Sheet1', 'Sheet2']);
         $this->reload();
 
         $got = $this->loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\SheetCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\SheetCollection', $got);
         $this->assertCount(2, $got);
 
         // get first sheet
@@ -86,17 +82,17 @@ public function testSelectMultipleSheets()
 
         // assert sheet title
         $this->assertEquals('Sheet1', $sheet->getTitle());
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $sheet);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $sheet);
         $this->assertCount(5, $sheet);
     }
 
     public function testSelectMultipleSheetsByIndex()
     {
-        $this->reader->setSelectedSheetIndices(array(0,1));
+        $this->reader->setSelectedSheetIndices([0, 1]);
         $this->reload();
 
         $got = $this->loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\SheetCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\SheetCollection', $got);
         $this->assertCount(2, $got);
 
         // get first sheet
@@ -104,8 +100,7 @@ public function testSelectMultipleSheetsByIndex()
 
         // assert sheet title
         $this->assertEquals('Sheet1', $sheet->getTitle());
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $sheet);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $sheet);
         $this->assertCount(5, $sheet);
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/ReaderTest.php b/tests/Readers/ReaderTest.php
index 3a9fde456..39831f479 100644
--- a/tests/Readers/ReaderTest.php
+++ b/tests/Readers/ReaderTest.php
@@ -1,13 +1,10 @@
 assertEquals($this->excel, $this->reader->getExcel());
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/XlsReaderTest.php b/tests/Readers/XlsReaderTest.php
index afb883cd9..1d51ec9d1 100644
--- a/tests/Readers/XlsReaderTest.php
+++ b/tests/Readers/XlsReaderTest.php
@@ -3,21 +3,16 @@
 require_once('traits/ImportTrait.php');
 require_once('traits/SingleImportTestingTrait.php');
 
-use Mockery as m;
-use Maatwebsite\Excel\Readers\LaravelExcelReader;
-use Maatwebsite\Excel\Classes;
-
-class XlsReaderTest extends TestCase {
-
+class XlsReaderTest extends TestCase
+{
     /**
-     * Import trait
+     * Import trait.
      */
     use ImportTrait, SingleImportTestingTrait;
 
     /**
-     * Filename
+     * Filename.
      * @var string
      */
     protected $fileName = 'files/test.xls';
-
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/XlsxReaderTest.php b/tests/Readers/XlsxReaderTest.php
index aa637cdb1..ef34ea0c6 100644
--- a/tests/Readers/XlsxReaderTest.php
+++ b/tests/Readers/XlsxReaderTest.php
@@ -3,21 +3,16 @@
 require_once('traits/ImportTrait.php');
 require_once('traits/SingleImportTestingTrait.php');
 
-use Mockery as m;
-use Maatwebsite\Excel\Readers\LaravelExcelReader;
-use Maatwebsite\Excel\Classes;
-
-class XlsxReaderTest extends TestCase {
-
+class XlsxReaderTest extends TestCase
+{
     /**
-     * Import trait
+     * Import trait.
      */
     use ImportTrait, SingleImportTestingTrait;
 
     /**
-     * Filename
+     * Filename.
      * @var string
      */
     protected $fileName = 'files/test.xlsx';
-
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/ZerosHandlingReaderTest.php b/tests/Readers/ZerosHandlingReaderTest.php
index 09d28e942..b1be480d6 100644
--- a/tests/Readers/ZerosHandlingReaderTest.php
+++ b/tests/Readers/ZerosHandlingReaderTest.php
@@ -3,17 +3,15 @@
 require_once('traits/ImportTrait.php');
 require_once('traits/SingleImportTestingTrait.php');
 
-use Mockery as m;
-
-class ZerosHandlingReaderTest extends TestCase {
-
+class ZerosHandlingReaderTest extends TestCase
+{
     /**
-     * Traits
+     * Traits.
      */
     use ImportTrait;
 
     /**
-     * Filename
+     * Filename.
      * @var string
      */
     protected $fileName = 'files/zeros.xls';
@@ -23,11 +21,10 @@ class ZerosHandlingReaderTest extends TestCase {
      */
     protected $noHeadings = false;
 
-
     public function testDefaultGet()
     {
         $got = $this->loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $got);
         $this->assertCount(6, $got);
     }
 
@@ -48,7 +45,6 @@ public function testDefaultGet()
     //    $this->assertContains('000', $got[0]);
     //}
 
-
     public function testMoney()
     {
         $got = $this->loadedFile->toArray();
@@ -56,7 +52,6 @@ public function testMoney()
         $this->assertContains((double) 0, $got[1]);
     }
 
-
     public function testEmptyCellHandling()
     {
         $got = $this->loadedFile->toArray();
@@ -64,7 +59,6 @@ public function testEmptyCellHandling()
         $this->assertContains(null, $got[2]);
     }
 
-
     public function testNormalZeros()
     {
         $got = $this->loadedFile->toArray();
diff --git a/tests/Readers/traits/ImportTrait.php b/tests/Readers/traits/ImportTrait.php
index dd1372c64..b088bb8a4 100644
--- a/tests/Readers/traits/ImportTrait.php
+++ b/tests/Readers/traits/ImportTrait.php
@@ -1,21 +1,21 @@
 reader->injectExcel($this->excel);
 
         // Disable heading usage
-        if(isset($this->noHeadings) && $this->noHeadings)
+        if (isset($this->noHeadings) && $this->noHeadings) {
             $this->reader->noHeading(true);
+        }
 
         // Load csv file
         $this->loadFile();
     }
 
     /**
-     * Test loading a csv file
+     * Test loading a csv file.
      * @return [type] [description]
      */
     public function testLoadFile()
@@ -50,7 +51,7 @@ public function testLoadFile()
     }
 
     /**
-     * Load a csv file
+     * Load a csv file.
      * @return [type] [description]
      */
     protected function loadFile()
@@ -63,7 +64,7 @@ protected function loadFile()
     }
 
     /**
-     * Load a csv file
+     * Load a csv file.
      * @return [type] [description]
      */
     protected function reload()
@@ -74,4 +75,4 @@ protected function reload()
         // Loaded csv
         return $this->reader->load($this->file);
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Readers/traits/SingleImportTestingTrait.php b/tests/Readers/traits/SingleImportTestingTrait.php
index 96ade0b01..a7fb7e1bc 100644
--- a/tests/Readers/traits/SingleImportTestingTrait.php
+++ b/tests/Readers/traits/SingleImportTestingTrait.php
@@ -1,114 +1,105 @@
 loadedFile->get();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $got);
         $this->assertCount(5, $got);
     }
 
-
     public function testGetWithColumns()
     {
-        $columns = array('heading_one', 'heading_two');
-        $got = $this->loadedFile->get($columns);
+        $columns = ['heading_one', 'heading_two'];
+        $got     = $this->loadedFile->get($columns);
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $got);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $got);
         $this->assertCount(5, $got);
     }
 
-
     public function testAll()
     {
         $all = $this->loadedFile->all();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\RowCollection', $all);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\RowCollection', $all);
         $this->assertCount(5, $all);
     }
 
-
     public function testFirst()
     {
         $first = $this->loadedFile->first();
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\CellCollection', $first);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\CellCollection', $first);
 
         // 3 columns
         $this->assertCount(3, $first);
     }
 
-
     public function testFirstWithColumns()
     {
-        $columns = array('heading_one', 'heading_two');
-        $first = $this->loadedFile->first($columns);
+        $columns = ['heading_one', 'heading_two'];
+        $first   = $this->loadedFile->first($columns);
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\CellCollection', $first);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\CellCollection', $first);
         $this->assertCount(count($columns), $first);
     }
 
-
     public function testEach()
     {
         $me = $this;
 
-        $this->loadedFile->each(function($cells) use($me) {
+        $this->loadedFile->each(function ($cells) use ($me) {
 
-            $me->assertInstanceOf('Maatwebsite\Excel\Collections\CellCollection', $cells);
+            $me->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\CellCollection', $cells);
 
         });
     }
 
-
     public function testToArray()
     {
         $array = $this->loadedFile->toArray();
-        $this->assertEquals(array(
+        $this->assertEquals([
 
-            array(
-                'heading_one'  => 'test',
-                'heading_two'  => 'test',
+            [
+                'heading_one'    => 'test',
+                'heading_two'    => 'test',
                 'heading_three'  => 'test',
-            ),
-            array(
-                'heading_one'  => 'test',
-                'heading_two'  => 'test',
+            ],
+            [
+                'heading_one'    => 'test',
+                'heading_two'    => 'test',
                 'heading_three'  => 'test',
-            ),
-            array(
-                'heading_one'  => 'test',
-                'heading_two'  => 'test',
+            ],
+            [
+                'heading_one'    => 'test',
+                'heading_two'    => 'test',
                 'heading_three'  => 'test',
-            ),
-            array(
-                'heading_one'  => 'test',
-                'heading_two'  => 'test',
+            ],
+            [
+                'heading_one'    => 'test',
+                'heading_two'    => 'test',
                 'heading_three'  => 'test',
-            ),
-            array(
-                'heading_one'  => 'test',
-                'heading_two'  => 'test',
+            ],
+            [
+                'heading_one'    => 'test',
+                'heading_two'    => 'test',
                 'heading_three'  => 'test',
-            )
+            ],
 
-        ), $array);
+        ], $array);
     }
 
-
     public function testImportedHeadingsSlugged()
     {
         $first = $this->loadedFile->first()->toArray();
         $keys  = array_keys($first);
 
-        $this->assertEquals(array(
+        $this->assertEquals([
             'heading_one',
             'heading_two',
-            'heading_three'
-        ), $keys);
+            'heading_three',
+        ], $keys);
     }
 
-
     public function testImportedHeadingsHashed()
     {
         Config::set('excel.import.heading', 'hashed');
@@ -118,14 +109,13 @@ public function testImportedHeadingsHashed()
         $first = $loaded->first()->toArray();
         $keys  = array_keys($first);
 
-        $this->assertEquals(array(
+        $this->assertEquals([
             md5('heading one'),
             md5('heading two'),
-            md5('heading three')
-        ), $keys);
+            md5('heading three'),
+        ], $keys);
     }
 
-
     public function testImportedHeadingsNumeric()
     {
         Config::set('excel.import.heading', 'numeric');
@@ -135,14 +125,13 @@ public function testImportedHeadingsNumeric()
         $first = $loaded->first()->toArray();
         $keys  = array_keys($first);
 
-        $this->assertEquals(array(
+        $this->assertEquals([
             0,
             1,
-            2
-        ), $keys);
+            2,
+        ], $keys);
     }
 
-
     public function testImportedHeadingsOriginal()
     {
         Config::set('excel.import.heading', 'original');
@@ -152,14 +141,13 @@ public function testImportedHeadingsOriginal()
         $first = $loaded->first()->toArray();
         $keys  = array_keys($first);
 
-        $this->assertEquals(array(
+        $this->assertEquals([
             'heading one',
             'heading two',
-            'heading three'
-        ), $keys);
+            'heading three',
+        ], $keys);
     }
 
-
     public function testRemember()
     {
         $remembered = $this->loadedFile->remember(10);
@@ -169,27 +157,23 @@ public function testRemember()
         $this->assertTrue($remembered->remembered);
     }
 
-
     public function testByConfig()
     {
         $config = $this->loadedFile->byConfig('excel.import.sheets');
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\SheetCollection', $config);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\SheetCollection', $config);
     }
 
-
     public function testByConfigCallback()
     {
         $me = $this;
 
-        $config = $this->loadedFile->byConfig('excel.import.sheets', function($config) use($me)
-        {
-            $me->assertInstanceOf('Maatwebsite\Excel\Readers\ConfigReader', $config);
+        $config = $this->loadedFile->byConfig('excel.import.sheets', function ($config) use ($me) {
+            $me->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Readers\ConfigReader', $config);
         });
 
-        $this->assertInstanceOf('Maatwebsite\Excel\Collections\SheetCollection', $config);
+        $this->assertInstanceOf('Maatwebsite\Excel\Drivers\PHPExcel\Collections\SheetCollection', $config);
     }
 
-
     public function testTake()
     {
         $taken = $this->loadedFile->take(2);
@@ -197,7 +181,6 @@ public function testTake()
         $this->assertCount(2, $taken->get());
     }
 
-
     public function testSkip()
     {
         $taken = $this->loadedFile->skip(1);
@@ -205,7 +188,6 @@ public function testSkip()
         $this->assertCount(4, $taken->get());
     }
 
-
     public function testLimit()
     {
         $taken = $this->loadedFile->limit(2, 1);
@@ -214,23 +196,20 @@ public function testLimit()
         $this->assertCount(2, $taken->get());
     }
 
-
     public function testSelect()
     {
-        $columns = array('heading_one', 'heading_two');
+        $columns = ['heading_one', 'heading_two'];
 
         $taken = $this->loadedFile->select($columns);
         $this->assertEquals($columns, $taken->columns);
     }
 
-
     public function testSetDateFormat()
     {
         $set = $this->loadedFile->setDateFormat('Y-m-d');
         $this->assertEquals('Y-m-d', $set->getDateFormat());
     }
 
-
     public function testFormatDates()
     {
         $set = $this->loadedFile->formatDates(true, 'Y-m-d');
@@ -238,25 +217,22 @@ public function testFormatDates()
         $this->assertEquals('Y-m-d', $set->getDateFormat());
     }
 
-
     public function testSetDateColumns()
     {
         $set = $this->loadedFile->setDateColumns('created_at', 'deleted_at');
         $this->assertTrue($set->needsDateFormatting());
-        $this->assertEquals(array('created_at', 'deleted_at'), $set->getDateColumns());
+        $this->assertEquals(['created_at', 'deleted_at'], $set->getDateColumns());
     }
 
-
     public function testCalculate()
     {
         $set = $this->loadedFile->calculate();
         $this->assertTrue($set->needsCalculation());
     }
 
-
     public function testIgnoreEmpty()
     {
         $set = $this->loadedFile->ignoreEmpty();
         $this->assertTrue($set->needsIgnoreEmpty());
     }
-}
\ No newline at end of file
+}
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 25d0c8389..8c703b7f3 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -4,28 +4,25 @@
 
 class TestCase extends TestBenchTestCase
 {
-
     public function testExcelClass()
     {
         $excel = App::make('Maatwebsite\Excel\Excel');
         $this->assertInstanceOf('Maatwebsite\Excel\Excel', $excel);
     }
 
-
     protected function getPackageProviders($app)
     {
-        return array('Maatwebsite\Excel\ExcelServiceProvider');
+        return ['Maatwebsite\Excel\ExcelServiceProvider'];
     }
 
-
     protected function getPackagePath()
     {
-        return realpath(implode(DIRECTORY_SEPARATOR, array(
+        return realpath(implode(DIRECTORY_SEPARATOR, [
             __DIR__,
             '..',
             'src',
             'Maatwebsite',
-            'Excel'
-        )));
+            'Excel',
+        ]));
     }
 }
diff --git a/tests/TestConfig.php b/tests/TestConfig.php
index 8f7f1ea24..c4f61f7cf 100644
--- a/tests/TestConfig.php
+++ b/tests/TestConfig.php
@@ -4,7 +4,6 @@
 
 class TestConfig extends TestCase
 {
-
     public function tearDown()
     {
         parent::tearDown();
@@ -15,5 +14,4 @@ public function testCreatorConfig()
     {
         $this->assertEquals(Config::get('excel.creator'), 'Maatwebsite');
     }
-
-}
\ No newline at end of file
+}
diff --git a/tests/TestServiceProvider.php b/tests/TestServiceProvider.php
index 7918a33bc..6b9d27f41 100644
--- a/tests/TestServiceProvider.php
+++ b/tests/TestServiceProvider.php
@@ -5,7 +5,6 @@
 
 class TestServiceProvider extends TestCase
 {
-
     public function setUp()
     {
         parent::setUp();
@@ -19,7 +18,7 @@ public function tearDown()
 
     public function testProviders()
     {
-        $app = m::mock('Illuminate\Foundation\Application');
+        $app      = m::mock('Illuminate\Foundation\Application');
         $provider = new ExcelServiceProvider($app);
 
         $this->assertCount(6, $provider->provides());
@@ -31,4 +30,4 @@ public function testProviders()
         $this->assertContains('excel.parsers.view', $provider->provides());
         $this->assertContains('excel.writer', $provider->provides());
     }
-}
\ No newline at end of file
+}
diff --git a/tests/Writers/ExcelWriterTest.php b/tests/Writers/ExcelWriterTest.php
index 5ca24c122..16fa79634 100644
--- a/tests/Writers/ExcelWriterTest.php
+++ b/tests/Writers/ExcelWriterTest.php
@@ -1,14 +1,11 @@
 writer->setTitle($title);
         $this->assertEquals($this->writer, $titleSet);
 
@@ -47,7 +44,7 @@ public function testSetTitle()
     }
 
     /**
-     * Test setTitle()
+     * Test setTitle().
      * @return [type] [description]
      */
     public function testSetFilename()
@@ -60,17 +57,16 @@ public function testSetFilename()
         $this->assertEquals($this->writer->getFileName(), $filename);
     }
 
-
     /**
-     * Test the share view
+     * Test the share view.
      * @return [type] [description]
      */
     public function testShareView()
     {
         // Set params
-        $view = 'excel';
-        $data = array();
-        $mergeData = array();
+        $view      = 'excel';
+        $data      = [];
+        $mergeData = [];
 
         $viewShared = $this->writer->shareView($view, $data, $mergeData);
         $this->assertEquals($this->writer, $viewShared);
@@ -85,12 +81,12 @@ public function testShareView()
     }
 
     /**
-     * Test basic sheet creation
+     * Test basic sheet creation.
      * @return [type] [description]
      */
     public function testSheet()
     {
-        $title = 'Worksheet Title';
+        $title        = 'Worksheet Title';
         $sheetCreated = $this->writer->sheet($title);
 
         $this->assertEquals($this->writer, $sheetCreated);
@@ -100,15 +96,15 @@ public function testSheet()
     }
 
     /**
-     * Test sheet closure
+     * Test sheet closure.
      * @return [type] [description]
      */
     public function testSheetClosure()
     {
-        $title = 'Worksheet Title';
+        $title        = 'Worksheet Title';
         $closureTitle = 'Closure Title';
 
-        $this->writer->sheet($title, function($sheet) use($closureTitle) {
+        $this->writer->sheet($title, function ($sheet) use ($closureTitle) {
             $sheet->setTitle($closureTitle);
         });
 
@@ -117,21 +113,20 @@ public function testSheetClosure()
     }
 
     /**
-     * Test multiple sheet creation
+     * Test multiple sheet creation.
      * @return [type] [description]
      */
     public function testMultipleSheets()
     {
         // Set sheet titles
-        $sheets = array(
+        $sheets = [
             'Worksheet 1 title',
             'Worksheet 2 title',
-            'Worksheet 3 title'
-        );
+            'Worksheet 3 title',
+        ];
 
         // Create the sheets
-        foreach($sheets as $sheetTitle)
-        {
+        foreach ($sheets as $sheetTitle) {
             $this->writer->sheet($sheetTitle);
         }
 
@@ -139,14 +134,13 @@ public function testMultipleSheets()
         $this->assertEquals(count($sheets), $this->writer->getSheetCount());
 
         // Test if all sheet titles where set correctly
-        foreach($sheets as $sheetTitle)
-        {
+        foreach ($sheets as $sheetTitle) {
             $this->assertContains($sheetTitle, $this->writer->getSheetNames());
         }
     }
 
     /**
-     * Test setting properties (creator, ...)
+     * Test setting properties (creator, ...).
      * @return [type] [description]
      */
     public function testSetProperties()
@@ -155,8 +149,7 @@ public function testSetProperties()
         $properties = $this->excel->getAllowedProperties();
 
         // Loop through them
-        foreach($properties as $prop)
-        {
+        foreach ($properties as $prop) {
             // Set a random value
             $originalValue = rand();
 
@@ -165,10 +158,10 @@ public function testSetProperties()
             $getMethod  = 'get' . ucfirst($prop);
 
             // Set the property with the random value
-            call_user_func_array(array($this->writer, $method), array($originalValue));
+            call_user_func_array([$this->writer, $method], [$originalValue]);
 
             // Get the property back
-            $returnedValue = call_user_func_array(array($this->writer->getProperties(), $getMethod), array());
+            $returnedValue = call_user_func_array([$this->writer->getProperties(), $getMethod], []);
 
             // Check if the properties matches
             $this->assertEquals($originalValue, $returnedValue, $prop . ' doesn\'t match');
@@ -177,13 +170,11 @@ public function testSetProperties()
 
     public function testCreateFromArray()
     {
-        $info = Excel::create('test', function ($writer)
-        {
+        $info = Excel::create('test', function ($writer) {
 
-            $writer->sheet('test', function ($sheet)
-            {
+            $writer->sheet('test', function ($sheet) {
                 $sheet->fromArray([
-                    'test data'
+                    'test data',
                 ]);
             });
         })->store('csv', __DIR__ . '/exports', true);
@@ -191,13 +182,10 @@ public function testCreateFromArray()
         $this->assertTrue(file_exists($info['full']));
     }
 
-
     public function testNumberPrecision()
     {
-        $info = Excel::create('numbers', function ($writer)
-        {
-            $writer->sheet('test', function ($sheet)
-            {
+        $info = Excel::create('numbers', function ($writer) {
+            $writer->sheet('test', function ($sheet) {
                 $sheet->fromArray([
                     ['number' => '1234'],
                     ['number' => '1234.020'],
@@ -235,4 +223,4 @@ public function testNumberPrecision()
 
         $this->assertEquals(1234 + 1234, $results[8]['number']);
     }
-}
\ No newline at end of file
+}

From cadbc919c3f9526c207e36c737b4bcdc59e0ca9f Mon Sep 17 00:00:00 2001
From: Patrick Brouwers 
Date: Wed, 21 Sep 2016 17:14:53 +0200
Subject: [PATCH 045/998] Implement Reader and Writer interface

---
 .php_cs.cache                                 |  2 +-
 .../PHPExcel/Readers/LaravelExcelReader.php   |  3 +-
 .../PHPExcel/Writers/LaravelExcelWriter.php   |  3 +-
 src/Excel.php                                 | 39 +++++++-------
 src/Reader.php                                | 33 ++++++++++++
 src/Writer.php                                | 54 +++++++++++++++++++
 6 files changed, 110 insertions(+), 24 deletions(-)
 create mode 100644 src/Reader.php
 create mode 100644 src/Writer.php

diff --git a/.php_cs.cache b/.php_cs.cache
index b78dce6fc..7d5705250 100644
--- a/.php_cs.cache
+++ b/.php_cs.cache
@@ -1 +1 @@
-a:3:{s:7:"version";s:6:"1.11.6";s:6:"fixers";a:45:{i:0;s:18:"align_double_arrow";i:1;s:12:"align_equals";i:2;s:24:"blankline_after_open_tag";i:3;s:6:"braces";i:4;s:18:"concat_with_spaces";i:5;s:6:"elseif";i:6;s:8:"encoding";i:7;s:10:"eof_ending";i:8;s:17:"extra_empty_lines";i:9;s:19:"function_call_space";i:10;s:20:"function_declaration";i:11;s:11:"indentation";i:12;s:20:"line_after_namespace";i:13;s:8:"linefeed";i:14;s:19:"lowercase_constants";i:15;s:18:"lowercase_keywords";i:16;s:21:"method_argument_space";i:17;s:30:"multiline_array_trailing_comma";i:18;s:12:"multiple_use";i:19;s:31:"namespace_no_leading_whitespace";i:20;s:34:"no_blank_lines_after_class_opening";i:21;s:28:"no_empty_lines_after_phpdocs";i:22;s:11:"ordered_use";i:23;s:11:"parenthesis";i:24;s:15:"php_closing_tag";i:25;s:13:"phpdoc_indent";i:26;s:22:"phpdoc_no_empty_return";i:27;s:12:"phpdoc_order";i:28;s:13:"phpdoc_params";i:29;s:13:"phpdoc_scalar";i:30;s:24:"phpdoc_short_description";i:31;s:11:"phpdoc_trim";i:32;s:18:"phpdoc_type_to_var";i:33;s:23:"phpdoc_var_without_name";i:34;s:25:"remove_lines_between_uses";i:35;s:6:"return";i:36;s:18:"short_array_syntax";i:37;s:9:"short_tag";i:38;s:30:"single_array_no_trailing_comma";i:39;s:25:"single_line_after_imports";i:40;s:15:"trailing_spaces";i:41;s:22:"unary_operators_spaces";i:42;s:10:"unused_use";i:43;s:10:"visibility";i:44;s:16:"whitespacy_lines";}s:6:"hashes";a:62:{s:16:"config/excel.php";i:1173128804;s:38:"src/Drivers/PHPExcel/Classes/Cache.php";i:3904479517;s:49:"src/Drivers/PHPExcel/Classes/FormatIdentifier.php";i:3312175569;s:54:"src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php";i:4127291209;s:41:"src/Drivers/PHPExcel/Classes/PHPExcel.php";i:2183746486;s:51:"src/Drivers/PHPExcel/Collections/CellCollection.php";i:3855734396;s:52:"src/Drivers/PHPExcel/Collections/ExcelCollection.php";i:1783836521;s:50:"src/Drivers/PHPExcel/Collections/RowCollection.php";i:3917364025;s:52:"src/Drivers/PHPExcel/Collections/SheetCollection.php";i:598701393;s:30:"src/Drivers/PHPExcel/Excel.php";i:2041369889;s:48:"src/Drivers/PHPExcel/Filters/ChunkReadFilter.php";i:370213494;s:42:"src/Drivers/PHPExcel/Parsers/CssParser.php";i:291468400;s:44:"src/Drivers/PHPExcel/Parsers/ExcelParser.php";i:2240566599;s:43:"src/Drivers/PHPExcel/Parsers/ViewParser.php";i:603320239;s:38:"src/Drivers/PHPExcel/Readers/Batch.php";i:376486304;s:47:"src/Drivers/PHPExcel/Readers/ChunkedReadJob.php";i:494225974;s:45:"src/Drivers/PHPExcel/Readers/ConfigReader.php";i:3238554140;s:43:"src/Drivers/PHPExcel/Readers/HtmlReader.php";i:396548915;s:51:"src/Drivers/PHPExcel/Readers/LaravelExcelReader.php";i:1375350520;s:43:"src/Drivers/PHPExcel/Writers/CellWriter.php";i:887345063;s:51:"src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php";i:2993850334;s:13:"src/Excel.php";i:2660689515;s:20:"src/ExcelManager.php";i:1793019087;s:28:"src/ExcelServiceProvider.php";i:2427218828;s:40:"src/Exceptions/LaravelExcelException.php";i:1644082212;s:21:"src/Facades/Excel.php";i:652229935;s:23:"src/Files/ExcelFile.php";i:2824646715;s:27:"src/Files/ExportHandler.php";i:590137173;s:18:"src/Files/File.php";i:2794766140;s:27:"src/Files/ImportHandler.php";i:581777833;s:26:"src/Files/NewExcelFile.php";i:1626773074;s:40:"tests/Collections/CellCollectionTest.php";i:3107902333;s:29:"tests/Excel/ExcelTestCase.php";i:3525138755;s:27:"tests/Excel/ExcelTester.php";i:4122913651;s:37:"tests/Files/classes/CsvTestImport.php";i:3665541995;s:34:"tests/Files/classes/TestExport.php";i:393827966;s:41:"tests/Files/classes/TestExportHandler.php";i:1082662775;s:32:"tests/Files/classes/TestFile.php";i:363938068;s:39:"tests/Files/classes/TestFileHandler.php";i:478048616;s:34:"tests/Files/classes/TestImport.php";i:230995273;s:41:"tests/Files/classes/TestImportHandler.php";i:3990882985;s:35:"tests/Files/classes/TestNewFile.php";i:54425924;s:42:"tests/Files/classes/TestNewFileHandler.php";i:2264162448;s:32:"tests/Files/CsvExcelFileTest.php";i:1150198657;s:29:"tests/Files/ExcelFileTest.php";i:4270269824;s:32:"tests/Files/NewExcelFileTest.php";i:4109333923;s:37:"tests/Filters/ChunkReadFilterTest.php";i:1114142528;s:40:"tests/Filters/RegisterFilterTestCase.php";i:2996738919;s:38:"tests/Readers/ChineseXlsReaderTest.php";i:1131264947;s:31:"tests/Readers/CsvReaderTest.php";i:748231737;s:39:"tests/Readers/CustomValueBinderTest.php";i:1448578307;s:45:"tests/Readers/MultipleSheetsXlsReaderTest.php";i:2146723105;s:28:"tests/Readers/ReaderTest.php";i:1526884084;s:36:"tests/Readers/traits/ImportTrait.php";i:163964272;s:49:"tests/Readers/traits/SingleImportTestingTrait.php";i:2933273630;s:31:"tests/Readers/XlsReaderTest.php";i:356229840;s:32:"tests/Readers/XlsxReaderTest.php";i:2376448368;s:41:"tests/Readers/ZerosHandlingReaderTest.php";i:3858235616;s:18:"tests/TestCase.php";i:2761530444;s:20:"tests/TestConfig.php";i:4108888961;s:29:"tests/TestServiceProvider.php";i:3639993996;s:33:"tests/Writers/ExcelWriterTest.php";i:4069389983;}}
\ No newline at end of file
+a:3:{s:7:"version";s:6:"1.11.6";s:6:"fixers";a:45:{i:0;s:18:"align_double_arrow";i:1;s:12:"align_equals";i:2;s:24:"blankline_after_open_tag";i:3;s:6:"braces";i:4;s:18:"concat_with_spaces";i:5;s:6:"elseif";i:6;s:8:"encoding";i:7;s:10:"eof_ending";i:8;s:17:"extra_empty_lines";i:9;s:19:"function_call_space";i:10;s:20:"function_declaration";i:11;s:11:"indentation";i:12;s:20:"line_after_namespace";i:13;s:8:"linefeed";i:14;s:19:"lowercase_constants";i:15;s:18:"lowercase_keywords";i:16;s:21:"method_argument_space";i:17;s:30:"multiline_array_trailing_comma";i:18;s:12:"multiple_use";i:19;s:31:"namespace_no_leading_whitespace";i:20;s:34:"no_blank_lines_after_class_opening";i:21;s:28:"no_empty_lines_after_phpdocs";i:22;s:11:"ordered_use";i:23;s:11:"parenthesis";i:24;s:15:"php_closing_tag";i:25;s:13:"phpdoc_indent";i:26;s:22:"phpdoc_no_empty_return";i:27;s:12:"phpdoc_order";i:28;s:13:"phpdoc_params";i:29;s:13:"phpdoc_scalar";i:30;s:24:"phpdoc_short_description";i:31;s:11:"phpdoc_trim";i:32;s:18:"phpdoc_type_to_var";i:33;s:23:"phpdoc_var_without_name";i:34;s:25:"remove_lines_between_uses";i:35;s:6:"return";i:36;s:18:"short_array_syntax";i:37;s:9:"short_tag";i:38;s:30:"single_array_no_trailing_comma";i:39;s:25:"single_line_after_imports";i:40;s:15:"trailing_spaces";i:41;s:22:"unary_operators_spaces";i:42;s:10:"unused_use";i:43;s:10:"visibility";i:44;s:16:"whitespacy_lines";}s:6:"hashes";a:64:{s:16:"config/excel.php";i:1173128804;s:38:"src/Drivers/PHPExcel/Classes/Cache.php";i:3904479517;s:49:"src/Drivers/PHPExcel/Classes/FormatIdentifier.php";i:3312175569;s:54:"src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php";i:4127291209;s:41:"src/Drivers/PHPExcel/Classes/PHPExcel.php";i:2183746486;s:51:"src/Drivers/PHPExcel/Collections/CellCollection.php";i:3855734396;s:52:"src/Drivers/PHPExcel/Collections/ExcelCollection.php";i:1783836521;s:50:"src/Drivers/PHPExcel/Collections/RowCollection.php";i:3917364025;s:52:"src/Drivers/PHPExcel/Collections/SheetCollection.php";i:598701393;s:30:"src/Drivers/PHPExcel/Excel.php";i:2041369889;s:48:"src/Drivers/PHPExcel/Filters/ChunkReadFilter.php";i:370213494;s:42:"src/Drivers/PHPExcel/Parsers/CssParser.php";i:291468400;s:44:"src/Drivers/PHPExcel/Parsers/ExcelParser.php";i:2240566599;s:43:"src/Drivers/PHPExcel/Parsers/ViewParser.php";i:603320239;s:38:"src/Drivers/PHPExcel/Readers/Batch.php";i:376486304;s:47:"src/Drivers/PHPExcel/Readers/ChunkedReadJob.php";i:494225974;s:45:"src/Drivers/PHPExcel/Readers/ConfigReader.php";i:3238554140;s:43:"src/Drivers/PHPExcel/Readers/HtmlReader.php";i:396548915;s:51:"src/Drivers/PHPExcel/Readers/LaravelExcelReader.php";i:4294844900;s:43:"src/Drivers/PHPExcel/Writers/CellWriter.php";i:887345063;s:51:"src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php";i:1140355561;s:13:"src/Excel.php";i:629014494;s:20:"src/ExcelManager.php";i:1793019087;s:28:"src/ExcelServiceProvider.php";i:2427218828;s:40:"src/Exceptions/LaravelExcelException.php";i:1644082212;s:21:"src/Facades/Excel.php";i:652229935;s:23:"src/Files/ExcelFile.php";i:2824646715;s:27:"src/Files/ExportHandler.php";i:590137173;s:18:"src/Files/File.php";i:2794766140;s:27:"src/Files/ImportHandler.php";i:581777833;s:26:"src/Files/NewExcelFile.php";i:1626773074;s:14:"src/Reader.php";i:2683321425;s:14:"src/Writer.php";i:1401033030;s:40:"tests/Collections/CellCollectionTest.php";i:3107902333;s:29:"tests/Excel/ExcelTestCase.php";i:3525138755;s:27:"tests/Excel/ExcelTester.php";i:4122913651;s:37:"tests/Files/classes/CsvTestImport.php";i:3665541995;s:34:"tests/Files/classes/TestExport.php";i:393827966;s:41:"tests/Files/classes/TestExportHandler.php";i:1082662775;s:32:"tests/Files/classes/TestFile.php";i:363938068;s:39:"tests/Files/classes/TestFileHandler.php";i:478048616;s:34:"tests/Files/classes/TestImport.php";i:230995273;s:41:"tests/Files/classes/TestImportHandler.php";i:3990882985;s:35:"tests/Files/classes/TestNewFile.php";i:54425924;s:42:"tests/Files/classes/TestNewFileHandler.php";i:2264162448;s:32:"tests/Files/CsvExcelFileTest.php";i:1150198657;s:29:"tests/Files/ExcelFileTest.php";i:4270269824;s:32:"tests/Files/NewExcelFileTest.php";i:4109333923;s:37:"tests/Filters/ChunkReadFilterTest.php";i:1114142528;s:40:"tests/Filters/RegisterFilterTestCase.php";i:2996738919;s:38:"tests/Readers/ChineseXlsReaderTest.php";i:1131264947;s:31:"tests/Readers/CsvReaderTest.php";i:748231737;s:39:"tests/Readers/CustomValueBinderTest.php";i:1448578307;s:45:"tests/Readers/MultipleSheetsXlsReaderTest.php";i:2146723105;s:28:"tests/Readers/ReaderTest.php";i:1526884084;s:36:"tests/Readers/traits/ImportTrait.php";i:163964272;s:49:"tests/Readers/traits/SingleImportTestingTrait.php";i:2933273630;s:31:"tests/Readers/XlsReaderTest.php";i:356229840;s:32:"tests/Readers/XlsxReaderTest.php";i:2376448368;s:41:"tests/Readers/ZerosHandlingReaderTest.php";i:3858235616;s:18:"tests/TestCase.php";i:2761530444;s:20:"tests/TestConfig.php";i:4108888961;s:29:"tests/TestServiceProvider.php";i:3639993996;s:33:"tests/Writers/ExcelWriterTest.php";i:4069389983;}}
\ No newline at end of file
diff --git a/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php b/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
index b5937de25..d6b88f837 100644
--- a/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
+++ b/src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
@@ -10,6 +10,7 @@
 use Maatwebsite\Excel\Drivers\PHPExcel\Classes\PHPExcel;
 use Maatwebsite\Excel\Drivers\PHPExcel\Parsers\ExcelParser;
 use Maatwebsite\Excel\Exceptions\LaravelExcelException;
+use Maatwebsite\Excel\Reader;
 use PHPExcel_Cell;
 use PHPExcel_Cell_DefaultValueBinder;
 use PHPExcel_Cell_IValueBinder;
@@ -25,7 +26,7 @@
  * @author     Maatwebsite 
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class LaravelExcelReader
+class LaravelExcelReader implements Reader
 {
     /**
      * Excel object.
diff --git a/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php b/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
index 6c8dd83e7..ac5ddd58e 100644
--- a/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
+++ b/src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
@@ -10,6 +10,7 @@
 use Maatwebsite\Excel\Drivers\PHPExcel\Classes\FormatIdentifier;
 use Maatwebsite\Excel\Drivers\PHPExcel\Classes\LaravelExcelWorksheet;
 use Maatwebsite\Excel\Exceptions\LaravelExcelException;
+use Maatwebsite\Excel\Writer;
 use PHPExcel_IOFactory;
 
 /**
@@ -22,7 +23,7 @@
  * @author     Maatwebsite 
  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  */
-class LaravelExcelWriter
+class LaravelExcelWriter implements Writer
 {
     /**
      * Spreadsheet filename.
diff --git a/src/Excel.php b/src/Excel.php
index 51c57e7ac..83b1b1ac3 100644
--- a/src/Excel.php
+++ b/src/Excel.php
@@ -2,35 +2,32 @@
 
 namespace Maatwebsite\Excel;
 
-use Maatwebsite\Excel\Drivers\PHPExcel\Readers\LaravelExcelReader;
-use Maatwebsite\Excel\Drivers\PHPExcel\Writers\LaravelExcelWriter;
-
 interface Excel
 {
     /**
      * Create a new file.
-     * @param                     $filename
-     * @param  callable|null      $callback
-     * @return LaravelExcelWriter
+     * @param                $filename
+     * @param  callable|null $callback
+     * @return Writer
      */
     public function create($filename, $callback = null);
 
     /**
      *  Load an existing file.
      *
-     * @param  string             $file                 The file we want to load
-     * @param  callback|null      $callback
-     * @param  string|null        $encoding
-     * @param  bool               $noBasePath
-     * @param  null               $callbackConfigReader
-     * @return LaravelExcelReader
+     * @param  string        $file                 The file we want to load
+     * @param  callback|null $callback
+     * @param  string|null   $encoding
+     * @param  bool          $noBasePath
+     * @param  null          $callbackConfigReader
+     * @return Reader
      */
     public function load($file, $callback = null, $encoding = null, $noBasePath = false, $callbackConfigReader = null);
 
     /**
      * Set select sheets.
      * @param  $sheets
-     * @return LaravelExcelReader
+     * @return Reader
      */
     public function selectSheets($sheets = []);
 
@@ -51,19 +48,19 @@ public function batch($files, callable $callback);
 
     /**
      * Create a new file and share a view.
-     * @param  string             $view
-     * @param  array              $data
-     * @param  array              $mergeData
-     * @return LaravelExcelWriter
+     * @param  string $view
+     * @param  array  $data
+     * @param  array  $mergeData
+     * @return Writer
      */
     public function shareView($view, $data = [], $mergeData = []);
 
     /**
      * Create a new file and load a view.
-     * @param  string             $view
-     * @param  array              $data
-     * @param  array              $mergeData
-     * @return LaravelExcelWriter
+     * @param  string $view
+     * @param  array  $data
+     * @param  array  $mergeData
+     * @return Writer
      */
     public function loadView($view, $data = [], $mergeData = []);
 
diff --git a/src/Reader.php b/src/Reader.php
new file mode 100644
index 000000000..b246e90c6
--- /dev/null
+++ b/src/Reader.php
@@ -0,0 +1,33 @@
+
Date: Sat, 17 Jun 2017 21:08:49 +0200
Subject: [PATCH 046/998] A fresh start

---
 .gitignore                                    |    1 +
 .idea/inspectionProfiles/Project_Default.xml  |   11 +
 .idea/vcs.xml                                 |    6 +
 .php_cs.cache                                 |    1 -
 .travis.yml                                   |   12 +-
 composer.json                                 |   44 +-
 config/excel.php                              |  694 +--------
 docs/blade.md                                 |    3 -
 docs/blade/load-view.md                       |   45 -
 docs/blade/styling.md                         |  133 --
 docs/blade/vars.md                            |   19 -
 docs/borders.md                               |   14 -
 docs/changelog.md                             |    2 -
 docs/changelog/version-1.md                   |  209 ---
 docs/changelog/version-2.md                   |   23 -
 docs/export.md                                |   16 -
 docs/export/array.md                          |   62 -
 docs/export/autofilter.md                     |    9 -
 docs/export/autosize.md                       |   16 -
 docs/export/call.md                           |   19 -
 docs/export/cells.md                          |   64 -
 docs/export/export.md                         |   34 -
 docs/export/format.md                         |   23 -
 docs/export/freeze.md                         |   15 -
 docs/export/injection.md                      |   61 -
 docs/export/merge.md                          |   19 -
 docs/export/rows.md                           |   63 -
 docs/export/sheet-styling.md                  |   50 -
 docs/export/sheets.md                         |   77 -
 docs/export/simple.md                         |   35 -
 docs/export/sizing.md                         |   41 -
 docs/export/store.md                          |   39 -
 docs/formats.md                               |   42 -
 docs/getting-started.md                       |    5 -
 docs/getting-started/config.md                |   18 -
 docs/getting-started/contributing.md          |   22 -
 docs/getting-started/installation.md          |   23 -
 docs/getting-started/license.md               |    3 -
 docs/getting-started/requirements.md          |    8 -
 docs/import.md                                |   14 -
 docs/import/basics.md                         |    9 -
 docs/import/batch.md                          |   43 -
 docs/import/cache.md                          |   12 -
 docs/import/calculation.md                    |   11 -
 docs/import/chunk.md                          |   49 -
 docs/import/config.md                         |   15 -
 docs/import/convert.md                        |    9 -
 docs/import/dates.md                          |   45 -
 docs/import/edit.md                           |    9 -
 docs/import/extra.md                          |   44 -
 docs/import/formatting.md                     |   38 -
 docs/import/injection.md                      |   87 --
 docs/import/results.md                        |  126 --
 docs/import/select.md                         |   31 -
 docs/merge.md                                 |    8 -
 docs/reference-guide.md                       |    6 -
 docs/reference-guide/borders.md               |   18 -
 docs/reference-guide/closures.md              |   10 -
 docs/reference-guide/css-styles.md            |   19 -
 docs/reference-guide/file-properties.md       |   15 -
 docs/reference-guide/formatting.md            |   37 -
 docs/reference-guide/sheet-properties.md      |   18 -
 dump.rdb                                      |    1 -
 phpunit.xml                                   |    5 +-
 provides.json                                 |   11 -
 src/Bridge/Laravel/ExcelServiceProvider.php   |   38 +
 src/Bridge/Laravel/Facades/Excel.php          |   19 +
 src/Bridge/Laravel/LaravelConfigBridge.php    |   36 +
 src/Configuration.php                         |   33 +
 src/Drivers/Driver.php                        |   13 +
 src/Drivers/PHPExcel/Classes/Cache.php        |  125 --
 .../PHPExcel/Classes/FormatIdentifier.php     |  274 ----
 .../Classes/LaravelExcelWorksheet.php         | 1222 ----------------
 src/Drivers/PHPExcel/Classes/PHPExcel.php     |  122 --
 .../PHPExcel/Collections/CellCollection.php   |   65 -
 .../PHPExcel/Collections/ExcelCollection.php  |   42 -
 .../PHPExcel/Collections/RowCollection.php    |   17 -
 .../PHPExcel/Collections/SheetCollection.php  |   17 -
 src/Drivers/PHPExcel/Excel.php                |  265 ----
 .../PHPExcel/Filters/ChunkReadFilter.php      |   48 -
 src/Drivers/PHPExcel/Parsers/CssParser.php    |  132 --
 src/Drivers/PHPExcel/Parsers/ExcelParser.php  |  645 --------
 src/Drivers/PHPExcel/Parsers/ViewParser.php   |  130 --
 src/Drivers/PHPExcel/Readers/Batch.php        |  146 --
 .../PHPExcel/Readers/ChunkedReadJob.php       |  113 --
 src/Drivers/PHPExcel/Readers/ConfigReader.php |  166 ---
 src/Drivers/PHPExcel/Readers/HtmlReader.php   | 1303 -----------------
 .../PHPExcel/Readers/LaravelExcelReader.php   | 1264 ----------------
 src/Drivers/PHPExcel/Writers/CellWriter.php   |  249 ----
 .../PHPExcel/Writers/LaravelExcelWriter.php   |  638 --------
 src/Drivers/PhpSpreadsheet/Driver.php         |   39 +
 src/Drivers/PhpSpreadsheet/Reader.php         |   23 +
 src/Drivers/PhpSpreadsheet/Writer.php         |   22 +
 src/Drivers/Spout/Driver.php                  |   39 +
 src/Drivers/Spout/Reader.php                  |   23 +
 src/Drivers/Spout/Writer.php                  |   22 +
 src/Excel.php                                 |   95 +-
 src/ExcelManager.php                          |   89 +-
 src/ExcelServiceProvider.php                  |   69 -
 src/Exceptions/LaravelExcelException.php      |   19 -
 src/Facades/Excel.php                         |   27 -
 src/Files/ExcelFile.php                       |  157 --
 src/Files/ExportHandler.php                   |   13 -
 src/Files/File.php                            |   93 --
 src/Files/ImportHandler.php                   |   13 -
 src/Files/NewExcelFile.php                    |   60 -
 src/Reader.php                                |   29 +-
 src/Writer.php                                |   51 +-
 tests/.gitkeep                                |    0
 tests/Collections/CellCollectionTest.php      |   47 -
 tests/Excel/ExcelTestCase.php                 |  109 --
 tests/Excel/ExcelTester.php                   |   45 -
 tests/ExcelManagerTest.php                    |  123 ++
 tests/ExcelTest.php                           |   68 +
 tests/Files/CsvExcelFileTest.php              |   21 -
 tests/Files/ExcelFileTest.php                 |   63 -
 tests/Files/NewExcelFileTest.php              |   49 -
 tests/Files/classes/CsvTestImport.php         |   21 -
 tests/Files/classes/TestExport.php            |   15 -
 tests/Files/classes/TestExportHandler.php     |   16 -
 tests/Files/classes/TestFile.php              |   30 -
 tests/Files/classes/TestFileHandler.php       |   16 -
 tests/Files/classes/TestImport.php            |   30 -
 tests/Files/classes/TestImportHandler.php     |   16 -
 tests/Files/classes/TestNewFile.php           |   15 -
 tests/Files/classes/TestNewFileHandler.php    |   16 -
 tests/Files/files/test-custom.csv             |    6 -
 tests/Files/files/test.csv                    |    6 -
 tests/Filters/ChunkReadFilterTest.php         |  101 --
 tests/Filters/RegisterFilterTestCase.php      |   76 -
 tests/Filters/files/multi.xls                 |  Bin 59904 -> 0 bytes
 tests/Filters/files/sample.csv                |   16 -
 tests/Filters/files/sample.xls                |  Bin 15360 -> 0 bytes
 tests/Filters/files/sample.xlsx               |  Bin 4880 -> 0 bytes
 tests/Filters/log.txt                         |    1 -
 tests/Filters/rounds.txt                      |    1 -
 tests/Readers/ChineseXlsReaderTest.php        |   95 --
 tests/Readers/CsvReaderTest.php               |   43 -
 tests/Readers/CustomValueBinderTest.php       |  106 --
 tests/Readers/MultipleSheetsXlsReaderTest.php |  106 --
 tests/Readers/ReaderTest.php                  |   29 -
 tests/Readers/XlsReaderTest.php               |   18 -
 tests/Readers/XlsxReaderTest.php              |   18 -
 tests/Readers/ZerosHandlingReaderTest.php     |   68 -
 tests/Readers/files/chinese.xls               |  Bin 20480 -> 0 bytes
 tests/Readers/files/customBinder.csv          |    5 -
 tests/Readers/files/multiple.xls              |  Bin 33280 -> 0 bytes
 tests/Readers/files/test.csv                  |    6 -
 tests/Readers/files/test.xls                  |  Bin 32256 -> 0 bytes
 tests/Readers/files/test.xlsx                 |  Bin 33758 -> 0 bytes
 tests/Readers/files/zeros.xls                 |  Bin 31744 -> 0 bytes
 tests/Readers/traits/ImportTrait.php          |   78 -
 .../traits/SingleImportTestingTrait.php       |  238 ---
 tests/TestCase.php                            |   28 -
 tests/TestConfig.php                          |   17 -
 tests/TestServiceProvider.php                 |   33 -
 tests/Writers/ExcelWriterTest.php             |  226 ---
 tests/Writers/exports/.gitignore              |    2 -
 158 files changed, 659 insertions(+), 12040 deletions(-)
 create mode 100644 .idea/inspectionProfiles/Project_Default.xml
 create mode 100644 .idea/vcs.xml
 delete mode 100644 .php_cs.cache
 delete mode 100644 docs/blade.md
 delete mode 100644 docs/blade/load-view.md
 delete mode 100644 docs/blade/styling.md
 delete mode 100644 docs/blade/vars.md
 delete mode 100644 docs/borders.md
 delete mode 100644 docs/changelog.md
 delete mode 100644 docs/changelog/version-1.md
 delete mode 100644 docs/changelog/version-2.md
 delete mode 100644 docs/export.md
 delete mode 100644 docs/export/array.md
 delete mode 100644 docs/export/autofilter.md
 delete mode 100644 docs/export/autosize.md
 delete mode 100644 docs/export/call.md
 delete mode 100644 docs/export/cells.md
 delete mode 100644 docs/export/export.md
 delete mode 100644 docs/export/format.md
 delete mode 100644 docs/export/freeze.md
 delete mode 100644 docs/export/injection.md
 delete mode 100644 docs/export/merge.md
 delete mode 100644 docs/export/rows.md
 delete mode 100644 docs/export/sheet-styling.md
 delete mode 100644 docs/export/sheets.md
 delete mode 100644 docs/export/simple.md
 delete mode 100644 docs/export/sizing.md
 delete mode 100644 docs/export/store.md
 delete mode 100644 docs/formats.md
 delete mode 100644 docs/getting-started.md
 delete mode 100644 docs/getting-started/config.md
 delete mode 100644 docs/getting-started/contributing.md
 delete mode 100644 docs/getting-started/installation.md
 delete mode 100644 docs/getting-started/license.md
 delete mode 100644 docs/getting-started/requirements.md
 delete mode 100644 docs/import.md
 delete mode 100644 docs/import/basics.md
 delete mode 100644 docs/import/batch.md
 delete mode 100644 docs/import/cache.md
 delete mode 100644 docs/import/calculation.md
 delete mode 100644 docs/import/chunk.md
 delete mode 100644 docs/import/config.md
 delete mode 100644 docs/import/convert.md
 delete mode 100644 docs/import/dates.md
 delete mode 100644 docs/import/edit.md
 delete mode 100644 docs/import/extra.md
 delete mode 100644 docs/import/formatting.md
 delete mode 100644 docs/import/injection.md
 delete mode 100644 docs/import/results.md
 delete mode 100644 docs/import/select.md
 delete mode 100644 docs/merge.md
 delete mode 100644 docs/reference-guide.md
 delete mode 100644 docs/reference-guide/borders.md
 delete mode 100644 docs/reference-guide/closures.md
 delete mode 100644 docs/reference-guide/css-styles.md
 delete mode 100644 docs/reference-guide/file-properties.md
 delete mode 100644 docs/reference-guide/formatting.md
 delete mode 100644 docs/reference-guide/sheet-properties.md
 delete mode 100644 dump.rdb
 delete mode 100644 provides.json
 create mode 100644 src/Bridge/Laravel/ExcelServiceProvider.php
 create mode 100644 src/Bridge/Laravel/Facades/Excel.php
 create mode 100644 src/Bridge/Laravel/LaravelConfigBridge.php
 create mode 100644 src/Configuration.php
 create mode 100644 src/Drivers/Driver.php
 delete mode 100644 src/Drivers/PHPExcel/Classes/Cache.php
 delete mode 100644 src/Drivers/PHPExcel/Classes/FormatIdentifier.php
 delete mode 100644 src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php
 delete mode 100644 src/Drivers/PHPExcel/Classes/PHPExcel.php
 delete mode 100644 src/Drivers/PHPExcel/Collections/CellCollection.php
 delete mode 100644 src/Drivers/PHPExcel/Collections/ExcelCollection.php
 delete mode 100644 src/Drivers/PHPExcel/Collections/RowCollection.php
 delete mode 100644 src/Drivers/PHPExcel/Collections/SheetCollection.php
 delete mode 100644 src/Drivers/PHPExcel/Excel.php
 delete mode 100644 src/Drivers/PHPExcel/Filters/ChunkReadFilter.php
 delete mode 100644 src/Drivers/PHPExcel/Parsers/CssParser.php
 delete mode 100644 src/Drivers/PHPExcel/Parsers/ExcelParser.php
 delete mode 100644 src/Drivers/PHPExcel/Parsers/ViewParser.php
 delete mode 100644 src/Drivers/PHPExcel/Readers/Batch.php
 delete mode 100644 src/Drivers/PHPExcel/Readers/ChunkedReadJob.php
 delete mode 100644 src/Drivers/PHPExcel/Readers/ConfigReader.php
 delete mode 100644 src/Drivers/PHPExcel/Readers/HtmlReader.php
 delete mode 100644 src/Drivers/PHPExcel/Readers/LaravelExcelReader.php
 delete mode 100644 src/Drivers/PHPExcel/Writers/CellWriter.php
 delete mode 100644 src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php
 create mode 100644 src/Drivers/PhpSpreadsheet/Driver.php
 create mode 100644 src/Drivers/PhpSpreadsheet/Reader.php
 create mode 100644 src/Drivers/PhpSpreadsheet/Writer.php
 create mode 100644 src/Drivers/Spout/Driver.php
 create mode 100644 src/Drivers/Spout/Reader.php
 create mode 100644 src/Drivers/Spout/Writer.php
 delete mode 100644 src/ExcelServiceProvider.php
 delete mode 100644 src/Exceptions/LaravelExcelException.php
 delete mode 100644 src/Facades/Excel.php
 delete mode 100644 src/Files/ExcelFile.php
 delete mode 100644 src/Files/ExportHandler.php
 delete mode 100644 src/Files/File.php
 delete mode 100644 src/Files/ImportHandler.php
 delete mode 100644 src/Files/NewExcelFile.php
 delete mode 100644 tests/.gitkeep
 delete mode 100644 tests/Collections/CellCollectionTest.php
 delete mode 100644 tests/Excel/ExcelTestCase.php
 delete mode 100644 tests/Excel/ExcelTester.php
 create mode 100644 tests/ExcelManagerTest.php
 create mode 100644 tests/ExcelTest.php
 delete mode 100644 tests/Files/CsvExcelFileTest.php
 delete mode 100644 tests/Files/ExcelFileTest.php
 delete mode 100644 tests/Files/NewExcelFileTest.php
 delete mode 100644 tests/Files/classes/CsvTestImport.php
 delete mode 100644 tests/Files/classes/TestExport.php
 delete mode 100644 tests/Files/classes/TestExportHandler.php
 delete mode 100644 tests/Files/classes/TestFile.php
 delete mode 100644 tests/Files/classes/TestFileHandler.php
 delete mode 100644 tests/Files/classes/TestImport.php
 delete mode 100644 tests/Files/classes/TestImportHandler.php
 delete mode 100644 tests/Files/classes/TestNewFile.php
 delete mode 100644 tests/Files/classes/TestNewFileHandler.php
 delete mode 100644 tests/Files/files/test-custom.csv
 delete mode 100644 tests/Files/files/test.csv
 delete mode 100644 tests/Filters/ChunkReadFilterTest.php
 delete mode 100644 tests/Filters/RegisterFilterTestCase.php
 delete mode 100644 tests/Filters/files/multi.xls
 delete mode 100644 tests/Filters/files/sample.csv
 delete mode 100644 tests/Filters/files/sample.xls
 delete mode 100644 tests/Filters/files/sample.xlsx
 delete mode 100644 tests/Filters/log.txt
 delete mode 100644 tests/Filters/rounds.txt
 delete mode 100644 tests/Readers/ChineseXlsReaderTest.php
 delete mode 100644 tests/Readers/CsvReaderTest.php
 delete mode 100644 tests/Readers/CustomValueBinderTest.php
 delete mode 100644 tests/Readers/MultipleSheetsXlsReaderTest.php
 delete mode 100644 tests/Readers/ReaderTest.php
 delete mode 100644 tests/Readers/XlsReaderTest.php
 delete mode 100644 tests/Readers/XlsxReaderTest.php
 delete mode 100644 tests/Readers/ZerosHandlingReaderTest.php
 delete mode 100644 tests/Readers/files/chinese.xls
 delete mode 100644 tests/Readers/files/customBinder.csv
 delete mode 100644 tests/Readers/files/multiple.xls
 delete mode 100644 tests/Readers/files/test.csv
 delete mode 100644 tests/Readers/files/test.xls
 delete mode 100644 tests/Readers/files/test.xlsx
 delete mode 100644 tests/Readers/files/zeros.xls
 delete mode 100644 tests/Readers/traits/ImportTrait.php
 delete mode 100644 tests/Readers/traits/SingleImportTestingTrait.php
 delete mode 100644 tests/TestCase.php
 delete mode 100644 tests/TestConfig.php
 delete mode 100644 tests/TestServiceProvider.php
 delete mode 100644 tests/Writers/ExcelWriterTest.php
 delete mode 100755 tests/Writers/exports/.gitignore

diff --git a/.gitignore b/.gitignore
index 582640226..38cdbd736 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 composer.phar
 composer.lock
 .DS_Store
+.idea
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 000000000..e3c03cdf8
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,11 @@
+
+  
+    
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 000000000..94a25f7f4
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+  
+    
+  
+
\ No newline at end of file
diff --git a/.php_cs.cache b/.php_cs.cache
deleted file mode 100644
index 7d5705250..000000000
--- a/.php_cs.cache
+++ /dev/null
@@ -1 +0,0 @@
-a:3:{s:7:"version";s:6:"1.11.6";s:6:"fixers";a:45:{i:0;s:18:"align_double_arrow";i:1;s:12:"align_equals";i:2;s:24:"blankline_after_open_tag";i:3;s:6:"braces";i:4;s:18:"concat_with_spaces";i:5;s:6:"elseif";i:6;s:8:"encoding";i:7;s:10:"eof_ending";i:8;s:17:"extra_empty_lines";i:9;s:19:"function_call_space";i:10;s:20:"function_declaration";i:11;s:11:"indentation";i:12;s:20:"line_after_namespace";i:13;s:8:"linefeed";i:14;s:19:"lowercase_constants";i:15;s:18:"lowercase_keywords";i:16;s:21:"method_argument_space";i:17;s:30:"multiline_array_trailing_comma";i:18;s:12:"multiple_use";i:19;s:31:"namespace_no_leading_whitespace";i:20;s:34:"no_blank_lines_after_class_opening";i:21;s:28:"no_empty_lines_after_phpdocs";i:22;s:11:"ordered_use";i:23;s:11:"parenthesis";i:24;s:15:"php_closing_tag";i:25;s:13:"phpdoc_indent";i:26;s:22:"phpdoc_no_empty_return";i:27;s:12:"phpdoc_order";i:28;s:13:"phpdoc_params";i:29;s:13:"phpdoc_scalar";i:30;s:24:"phpdoc_short_description";i:31;s:11:"phpdoc_trim";i:32;s:18:"phpdoc_type_to_var";i:33;s:23:"phpdoc_var_without_name";i:34;s:25:"remove_lines_between_uses";i:35;s:6:"return";i:36;s:18:"short_array_syntax";i:37;s:9:"short_tag";i:38;s:30:"single_array_no_trailing_comma";i:39;s:25:"single_line_after_imports";i:40;s:15:"trailing_spaces";i:41;s:22:"unary_operators_spaces";i:42;s:10:"unused_use";i:43;s:10:"visibility";i:44;s:16:"whitespacy_lines";}s:6:"hashes";a:64:{s:16:"config/excel.php";i:1173128804;s:38:"src/Drivers/PHPExcel/Classes/Cache.php";i:3904479517;s:49:"src/Drivers/PHPExcel/Classes/FormatIdentifier.php";i:3312175569;s:54:"src/Drivers/PHPExcel/Classes/LaravelExcelWorksheet.php";i:4127291209;s:41:"src/Drivers/PHPExcel/Classes/PHPExcel.php";i:2183746486;s:51:"src/Drivers/PHPExcel/Collections/CellCollection.php";i:3855734396;s:52:"src/Drivers/PHPExcel/Collections/ExcelCollection.php";i:1783836521;s:50:"src/Drivers/PHPExcel/Collections/RowCollection.php";i:3917364025;s:52:"src/Drivers/PHPExcel/Collections/SheetCollection.php";i:598701393;s:30:"src/Drivers/PHPExcel/Excel.php";i:2041369889;s:48:"src/Drivers/PHPExcel/Filters/ChunkReadFilter.php";i:370213494;s:42:"src/Drivers/PHPExcel/Parsers/CssParser.php";i:291468400;s:44:"src/Drivers/PHPExcel/Parsers/ExcelParser.php";i:2240566599;s:43:"src/Drivers/PHPExcel/Parsers/ViewParser.php";i:603320239;s:38:"src/Drivers/PHPExcel/Readers/Batch.php";i:376486304;s:47:"src/Drivers/PHPExcel/Readers/ChunkedReadJob.php";i:494225974;s:45:"src/Drivers/PHPExcel/Readers/ConfigReader.php";i:3238554140;s:43:"src/Drivers/PHPExcel/Readers/HtmlReader.php";i:396548915;s:51:"src/Drivers/PHPExcel/Readers/LaravelExcelReader.php";i:4294844900;s:43:"src/Drivers/PHPExcel/Writers/CellWriter.php";i:887345063;s:51:"src/Drivers/PHPExcel/Writers/LaravelExcelWriter.php";i:1140355561;s:13:"src/Excel.php";i:629014494;s:20:"src/ExcelManager.php";i:1793019087;s:28:"src/ExcelServiceProvider.php";i:2427218828;s:40:"src/Exceptions/LaravelExcelException.php";i:1644082212;s:21:"src/Facades/Excel.php";i:652229935;s:23:"src/Files/ExcelFile.php";i:2824646715;s:27:"src/Files/ExportHandler.php";i:590137173;s:18:"src/Files/File.php";i:2794766140;s:27:"src/Files/ImportHandler.php";i:581777833;s:26:"src/Files/NewExcelFile.php";i:1626773074;s:14:"src/Reader.php";i:2683321425;s:14:"src/Writer.php";i:1401033030;s:40:"tests/Collections/CellCollectionTest.php";i:3107902333;s:29:"tests/Excel/ExcelTestCase.php";i:3525138755;s:27:"tests/Excel/ExcelTester.php";i:4122913651;s:37:"tests/Files/classes/CsvTestImport.php";i:3665541995;s:34:"tests/Files/classes/TestExport.php";i:393827966;s:41:"tests/Files/classes/TestExportHandler.php";i:1082662775;s:32:"tests/Files/classes/TestFile.php";i:363938068;s:39:"tests/Files/classes/TestFileHandler.php";i:478048616;s:34:"tests/Files/classes/TestImport.php";i:230995273;s:41:"tests/Files/classes/TestImportHandler.php";i:3990882985;s:35:"tests/Files/classes/TestNewFile.php";i:54425924;s:42:"tests/Files/classes/TestNewFileHandler.php";i:2264162448;s:32:"tests/Files/CsvExcelFileTest.php";i:1150198657;s:29:"tests/Files/ExcelFileTest.php";i:4270269824;s:32:"tests/Files/NewExcelFileTest.php";i:4109333923;s:37:"tests/Filters/ChunkReadFilterTest.php";i:1114142528;s:40:"tests/Filters/RegisterFilterTestCase.php";i:2996738919;s:38:"tests/Readers/ChineseXlsReaderTest.php";i:1131264947;s:31:"tests/Readers/CsvReaderTest.php";i:748231737;s:39:"tests/Readers/CustomValueBinderTest.php";i:1448578307;s:45:"tests/Readers/MultipleSheetsXlsReaderTest.php";i:2146723105;s:28:"tests/Readers/ReaderTest.php";i:1526884084;s:36:"tests/Readers/traits/ImportTrait.php";i:163964272;s:49:"tests/Readers/traits/SingleImportTestingTrait.php";i:2933273630;s:31:"tests/Readers/XlsReaderTest.php";i:356229840;s:32:"tests/Readers/XlsxReaderTest.php";i:2376448368;s:41:"tests/Readers/ZerosHandlingReaderTest.php";i:3858235616;s:18:"tests/TestCase.php";i:2761530444;s:20:"tests/TestConfig.php";i:4108888961;s:29:"tests/TestServiceProvider.php";i:3639993996;s:33:"tests/Writers/ExcelWriterTest.php";i:4069389983;}}
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 124cbac2a..3b454f7ac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,13 @@
 language: php
 
 php:
-  - 5.5
-  - 5.6
-  - 7
+  - 7.0
+  - 7.1
 
 before_script:
-  - travis_retry composer self-update
-  - travis_retry composer install --prefer-source --no-interaction
+  - travis_retry composer install --dev --no-interaction
 
-script: phpunit
+script: vendor/bin/phpunit
 
 matrix:
-  allow_failures:
-    - php: hhvm
   fast_finish: true
diff --git a/composer.json b/composer.json
index d11ec428c..b5e71c5ee 100644
--- a/composer.json
+++ b/composer.json
@@ -1,9 +1,12 @@
 {
   "name": "maatwebsite/excel",
-  "description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel",
+  "description": "An eloquent way of importing and exporting Excel and CSV",
   "license": "LGPL",
   "keywords": [
     "laravel",
+    "php",
+    "spout",
+    "phpspreadsheet",
     "phpexcel",
     "excel",
     "csv",
@@ -18,38 +21,33 @@
     }
   ],
   "require": {
-    "php": ">=5.5",
-    "phpoffice/phpexcel": "1.8.*",
-    "illuminate/cache": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/config": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/filesystem": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*",
+    "php": ">=7.0",
+    "phpoffice/phpspreadsheet": "dev-develop",
     "nesbot/carbon": "~1.0",
     "tijsverkoyen/css-to-inline-styles": "~1.5"
   },
   "require-dev": {
-    "phpseclib/phpseclib": "~1.0",
-    "phpunit/phpunit": "~4.0",
-    "mockery/mockery": "~0.9",
-    "orchestra/testbench": "3.1.*"
-  },
-  "suggest": {
-    "illuminate/http": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/routing": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/view": "5.0.*|5.1.*|5.2.*|5.3.*",
-    "illuminate/queue": "5.0.*|5.1.*|5.2.*|5.3.*"
+    "phpunit/phpunit": "~6.2",
+    "illuminate/support": "5.*"
   },
   "autoload": {
-    "classmap": [
-      "src/"
-    ],
     "psr-4": {
       "Maatwebsite\\Excel\\": "src/"
     }
   },
   "autoload-dev": {
-    "classmap": [
-      "tests/TestCase.php"
-    ]
+    "psr-4": {
+      "Maatwebsite\\Excel\\Tests\\": "tests/"
+    }
+  },
+  "extra": {
+    "laravel": {
+      "providers": [
+        "Maatwebsite\\Excel\\Bridge\\Laravel\\ExcelServiceProvider"
+      ],
+      "aliases": {
+        "Excel": "Maatwebsite\\Excel\\Bridge\\Laravel\\Facades\\Excel"
+      }
+    }
   }
 }
diff --git a/config/excel.php b/config/excel.php
index a5816b711..8cf2f6d54 100644
--- a/config/excel.php
+++ b/config/excel.php
@@ -2,697 +2,7 @@
 
 return [
 
-    /*
-   |--------------------------------------------------------------------------
-   | Excel driver
-   |--------------------------------------------------------------------------
-   */
-    'driver' => 'phpexcel',
-
-    'cache' => [
-
-        /*
-        |--------------------------------------------------------------------------
-        | Enable/Disable cell caching
-        |--------------------------------------------------------------------------
-        */
-        'enable'   => true,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Caching driver
-        |--------------------------------------------------------------------------
-        |
-        | Set the caching driver
-        |
-        | Available methods:
-        | memory|gzip|serialized|igbinary|discISAM|apc|memcache|temp|wincache|sqlite|sqlite3
-        |
-        */
-        'driver'   => 'memory',
-
-        /*
-        |--------------------------------------------------------------------------
-        | Cache settings
-        |--------------------------------------------------------------------------
-        */
-        'settings' => [
-
-            'memoryCacheSize' => '32MB',
-            'cacheTime'       => 600,
-
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Memcache settings
-        |--------------------------------------------------------------------------
-        */
-        'memcache' => [
-
-            'host' => 'localhost',
-            'port' => 11211,
-
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Cache dir (for discISAM)
-        |--------------------------------------------------------------------------
-        */
-
-        'dir' => storage_path('cache'),
-    ],
-
-    'properties' => [
-        'creator'        => 'Maatwebsite',
-        'lastModifiedBy' => 'Maatwebsite',
-        'title'          => 'Spreadsheet',
-        'description'    => 'Default spreadsheet export',
-        'subject'        => 'Spreadsheet export',
-        'keywords'       => 'maatwebsite, excel, export',
-        'category'       => 'Excel',
-        'manager'        => 'Maatwebsite',
-        'company'        => 'Maatwebsite',
-    ],
-
-    /*
-    |--------------------------------------------------------------------------
-    | Sheets settings
-    |--------------------------------------------------------------------------
-    */
-    'sheets'     => [
-
-        /*
-        |--------------------------------------------------------------------------
-        | Default page setup
-        |--------------------------------------------------------------------------
-        */
-        'pageSetup' => [
-            'orientation'           => 'portrait',
-            'paperSize'             => '9',
-            'scale'                 => '100',
-            'fitToPage'             => false,
-            'fitToHeight'           => true,
-            'fitToWidth'            => true,
-            'columnsToRepeatAtLeft' => ['', ''],
-            'rowsToRepeatAtTop'     => [0, 0],
-            'horizontalCentered'    => false,
-            'verticalCentered'      => false,
-            'printArea'             => null,
-            'firstPageNumber'       => null,
-        ],
-    ],
-
-    /*
-    |--------------------------------------------------------------------------
-    | Creator
-    |--------------------------------------------------------------------------
-    |
-    | The default creator of a new Excel file
-    |
-    */
-
-    'creator' => 'Maatwebsite',
-
-    'csv' => [
-        /*
-       |--------------------------------------------------------------------------
-       | Delimiter
-       |--------------------------------------------------------------------------
-       |
-       | The default delimiter which will be used to read out a CSV file
-       |
-       */
-
-        'delimiter' => ',',
-
-        /*
-        |--------------------------------------------------------------------------
-        | Enclosure
-        |--------------------------------------------------------------------------
-        */
-
-        'enclosure' => '"',
-
-        /*
-        |--------------------------------------------------------------------------
-        | Line endings
-        |--------------------------------------------------------------------------
-        */
-
-        'line_ending' => "\r\n",
-
-        /*
-        |--------------------------------------------------------------------------
-        | setUseBom
-        |--------------------------------------------------------------------------
-        */
-
-        'use_bom' => false,
-    ],
-
-    'export' => [
-
-        /*
-        |--------------------------------------------------------------------------
-        | Autosize columns
-        |--------------------------------------------------------------------------
-        |
-        | Disable/enable column autosize or set the autosizing for
-        | an array of columns ( array('A', 'B') )
-        |
-        */
-        'autosize'                    => true,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Autosize method
-        |--------------------------------------------------------------------------
-        |
-        | --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX
-        | The default is based on an estimate, which does its calculation based
-        | on the number of characters in the cell value (applying any calculation
-        | and format mask, and allowing for wordwrap and rotation) and with an
-        | "arbitrary" adjustment based on the font (Arial, Calibri or Verdana,
-        | defaulting to Calibri if any other font is used) and a proportional
-        | adjustment for the font size.
-        |
-        | --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT
-        | The second method is more accurate, based on actual style formatting as
-        | well (bold, italic, etc), and is calculated by generating a gd2 imagettf
-        | bounding box and using its dimensions to determine the size; but this
-        | method is significantly slower, and its accuracy is still dependent on
-        | having the appropriate fonts installed.
-        |
-        */
-        'autosize-method'             => PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Auto generate table heading
-        |--------------------------------------------------------------------------
-        |
-        | If set to true, the array indices (or model attribute names)
-        | will automatically be used as first row (table heading)
-        |
-        */
-        'generate_heading_by_indices' => true,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Auto set alignment on merged cells
-        |--------------------------------------------------------------------------
-        */
-        'merged_cell_alignment'       => 'left',
-
-        /*
-        |--------------------------------------------------------------------------
-        | Pre-calculate formulas during export
-        |--------------------------------------------------------------------------
-        */
-        'calculate'                   => false,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Include Charts during export
-        |--------------------------------------------------------------------------
-        */
-        'includeCharts'               => false,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Default sheet settings
-        |--------------------------------------------------------------------------
-        */
-        'sheets'                      => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | Default page margin
-            |--------------------------------------------------------------------------
-            |
-            | 1) When set to false, default margins will be used
-            | 2) It's possible to enter a single margin which will
-            |    be used for all margins.
-            | 3) Alternatively you can pass an array with 4 margins
-            |    Default order: array(top, right, bottom, left)
-            |
-            */
-            'page_margin'          => false,
-
-            /*
-            |--------------------------------------------------------------------------
-            | Value in source array that stands for blank cell
-            |--------------------------------------------------------------------------
-            */
-            'nullValue'            => null,
-
-            /*
-            |--------------------------------------------------------------------------
-            | Insert array starting from this cell address as the top left coordinate
-            |--------------------------------------------------------------------------
-            */
-            'startCell'            => 'A1',
-
-            /*
-            |--------------------------------------------------------------------------
-            | Apply strict comparison when testing for null values in the array
-            |--------------------------------------------------------------------------
-            */
-            'strictNullComparison' => false,
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Store settings
-        |--------------------------------------------------------------------------
-        */
-
-        'store' => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | Path
-            |--------------------------------------------------------------------------
-            |
-            | The path we want to save excel file to
-            |
-            */
-            'path'       => storage_path('exports'),
-
-            /*
-            |--------------------------------------------------------------------------
-            | Return info
-            |--------------------------------------------------------------------------
-            |
-            | Whether we want to return information about the stored file or not
-            |
-            */
-            'returnInfo' => false,
-
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | PDF Settings
-        |--------------------------------------------------------------------------
-        */
-        'pdf'   => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | PDF Drivers
-            |--------------------------------------------------------------------------
-            | Supported: DomPDF, tcPDF, mPDF
-            */
-            'driver'  => 'DomPDF',
-
-            /*
-            |--------------------------------------------------------------------------
-            | PDF Driver settings
-            |--------------------------------------------------------------------------
-            */
-            'drivers' => [
-
-                /*
-                |--------------------------------------------------------------------------
-                | DomPDF settings
-                |--------------------------------------------------------------------------
-                */
-                'DomPDF' => [
-                    'path' => base_path('vendor/dompdf/dompdf/'),
-                ],
-
-                /*
-                |--------------------------------------------------------------------------
-                | tcPDF settings
-                |--------------------------------------------------------------------------
-                */
-                'tcPDF'  => [
-                    'path' => base_path('vendor/tecnick.com/tcpdf/'),
-                ],
-
-                /*
-                |--------------------------------------------------------------------------
-                | mPDF settings
-                |--------------------------------------------------------------------------
-                */
-                'mPDF'   => [
-                    'path' => base_path('vendor/mpdf/mpdf/'),
-                ],
-            ],
-        ],
-    ],
-
-    'filters' => [
-        /*
-        |--------------------------------------------------------------------------
-        | Register read filters
-        |--------------------------------------------------------------------------
-        */
-
-        'registered' => [
-            'chunk' => 'Maatwebsite\Excel\Drivers\PHPExcel\Filters\ChunkReadFilter',
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Enable certain filters for every file read
-        |--------------------------------------------------------------------------
-        */
-
-        'enabled' => [],
-    ],
-
-    'import' => [
-
-        /*
-        |--------------------------------------------------------------------------
-        | Has heading
-        |--------------------------------------------------------------------------
-        |
-        | The sheet has a heading (first) row which we can use as attribute names
-        |
-        | Options: true|false|slugged|slugged_with_count|ascii|numeric|hashed|trans|original
-        |
-        */
-
-        'heading' => 'slugged',
-
-        /*
-        |--------------------------------------------------------------------------
-        | First Row with data or heading of data
-        |--------------------------------------------------------------------------
-        |
-        | If the heading row is not the first row, or the data doesn't start
-        | on the first row, here you can change the start row.
-        |
-        */
-
-        'startRow' => 1,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Cell name word separator
-        |--------------------------------------------------------------------------
-        |
-        | The default separator which is used for the cell names
-        | Note: only applies to 'heading' settings 'true' && 'slugged'
-        |
-        */
-
-        'separator' => '_',
-
-        /*
-        |--------------------------------------------------------------------------
-        | Include Charts during import
-        |--------------------------------------------------------------------------
-        */
-
-        'includeCharts' => false,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Sheet heading conversion
-        |--------------------------------------------------------------------------
-        |
-        | Convert headings to ASCII
-        | Note: only applies to 'heading' settings 'true' && 'slugged'
-        |
-        */
-
-        'to_ascii' => true,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Import encoding
-        |--------------------------------------------------------------------------
-        */
-
-        'encoding' => [
-
-            'input'  => 'UTF-8',
-            'output' => 'UTF-8',
-
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Calculate
-        |--------------------------------------------------------------------------
-        |
-        | By default cells with formulas will be calculated.
-        |
-        */
-
-        'calculate' => true,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Ignore empty cells
-        |--------------------------------------------------------------------------
-        |
-        | By default empty cells are not ignored
-        |
-        */
-
-        'ignoreEmpty'             => false,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Force sheet collection
-        |--------------------------------------------------------------------------
-        |
-        | For a sheet collection even when there is only 1 sheets.
-        | When set to false and only 1 sheet found, the parsed file will return
-        | a row collection instead of a sheet collection.
-        | When set to true, it will return a sheet collection instead.
-        |
-        */
-        'force_sheets_collection' => false,
-
-        /*
-        |--------------------------------------------------------------------------
-        | Date format
-        |--------------------------------------------------------------------------
-        |
-        | The format dates will be parsed to
-        |
-        */
-
-        'dates'  => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | Enable/disable date formatting
-            |--------------------------------------------------------------------------
-            */
-            'enabled' => true,
-
-            /*
-            |--------------------------------------------------------------------------
-            | Default date format
-            |--------------------------------------------------------------------------
-            |
-            | If set to false, a carbon object will return
-            |
-            */
-            'format'  => false,
-
-            /*
-            |--------------------------------------------------------------------------
-            | Date columns
-            |--------------------------------------------------------------------------
-            */
-            'columns' => [],
-        ],
-
-        /*
-        |--------------------------------------------------------------------------
-        | Import sheets by config
-        |--------------------------------------------------------------------------
-        */
-        'sheets' => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | Example sheet
-            |--------------------------------------------------------------------------
-            |
-            | Example sheet "test" will grab the firstname at cell A2
-            |
-            */
-
-            'test' => [
-
-                'firstname' => 'A2',
-
-            ],
-
-        ],
-    ],
-
-    'views' => [
-
-        /*
-        |--------------------------------------------------------------------------
-        | Styles
-        |--------------------------------------------------------------------------
-        |
-        | The default styles which will be used when parsing a view
-        |
-        */
-
-        'styles' => [
-
-            /*
-            |--------------------------------------------------------------------------
-            | Table headings
-            |--------------------------------------------------------------------------
-            */
-            'th'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 12,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Strong tags
-            |--------------------------------------------------------------------------
-            */
-            'strong' => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 12,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Bold tags
-            |--------------------------------------------------------------------------
-            */
-            'b'      => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 12,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Italic tags
-            |--------------------------------------------------------------------------
-            */
-            'i'      => [
-                'font' => [
-                    'italic' => true,
-                    'size'   => 12,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Heading 1
-            |--------------------------------------------------------------------------
-            */
-            'h1'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 24,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Heading 2
-            |--------------------------------------------------------------------------
-            */
-            'h2'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 18,
-                ],
-            ],
-
-            /*
-            |--------------------------------------------------------------------------
-            | Heading 2
-            |--------------------------------------------------------------------------
-            */
-            'h3'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 13.5,
-                ],
-            ],
-
-            /*
-             |--------------------------------------------------------------------------
-             | Heading 4
-             |--------------------------------------------------------------------------
-             */
-            'h4'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 12,
-                ],
-            ],
-
-            /*
-             |--------------------------------------------------------------------------
-             | Heading 5
-             |--------------------------------------------------------------------------
-             */
-            'h5'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 10,
-                ],
-            ],
-
-            /*
-             |--------------------------------------------------------------------------
-             | Heading 6
-             |--------------------------------------------------------------------------
-             */
-            'h6'     => [
-                'font' => [
-                    'bold' => true,
-                    'size' => 7.5,
-                ],
-            ],
-
-            /*
-             |--------------------------------------------------------------------------
-             | Hyperlinks
-             |--------------------------------------------------------------------------
-             */
-            'a'      => [
-                'font' => [
-                    'underline' => true,
-                    'color'     => ['argb' => 'FF0000FF'],
-                ],
-            ],
-
-            /*
-             |--------------------------------------------------------------------------
-             | Horizontal rules
-             |--------------------------------------------------------------------------
-             */
-            'hr'     => [
-                'borders' => [
-                    'bottom' => [
-                        'style' => 'thin',
-                        'color' => ['FF000000'],
-                    ],
-                ],
-            ],
-        ],
-
-    ],
+    // phpspreadsheet|spout
+    'driver' => 'phpspreadsheet',
 
 ];
diff --git a/docs/blade.md b/docs/blade.md
deleted file mode 100644
index 9de2a139b..000000000
--- a/docs/blade.md
+++ /dev/null
@@ -1,3 +0,0 @@
-@include:Loading a view|load-view
-@include:Passing variables|vars
-@include:Styling sheets|styling
\ No newline at end of file
diff --git a/docs/blade/load-view.md b/docs/blade/load-view.md
deleted file mode 100644
index 697e8747b..000000000
--- a/docs/blade/load-view.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# @Blade to Excel
-
-We can utilise the magic of Laravel's Blade engine to power our Excel export. Sharing a view, loading a view per sheet, creating a html table inside a view, basic CSS styling, ...
-
-# Loading a view for a single sheet
-
-We can load a view for every sheet we create with `->loadView()`.
-
-    Excel::create('New file', function($excel) {
-
-        $excel->sheet('New sheet', function($sheet) {
-
-            $sheet->loadView('folder.view');
-
-        });
-
-    });
-
-# Using different views for different sheets
-
-    Excel::create('New file', function($excel) {
-
-        $excel->sheet('First sheet', function($sheet) {
-
-            $sheet->loadView('view_first');
-        });
-
-        $excel->sheet('Second sheet', function($sheet) {
-
-            $sheet->loadView('view_second');
-        });
-
-    });
-
-# Sharing a view for all sheets
-
-We can share a view for all sheets with `shareView()`.
-
-    Excel::shareView('folder.view')->create();
-
-# Unsetting a view for a sheet
-
-When we are using a shared view, but we don't want to use a view for the current sheet, we can use `->unsetView()`.
-
-    $sheet->unsetView();
\ No newline at end of file
diff --git a/docs/blade/styling.md b/docs/blade/styling.md
deleted file mode 100644
index b257d3924..000000000
--- a/docs/blade/styling.md
+++ /dev/null
@@ -1,133 +0,0 @@
-# Styling sheets
-
-### General styling
-
-If you want to change the general styling of your sheet (not cell or range specific), you can use the `->setStyle()` method or any of the other setters which can be found inside the export documentation.
-
-    // Font family
-    $sheet->setFontFamily('Comic Sans MS');
-
-    // Set font with ->setStyle()`
-    $sheet->setStyle(array(
-        'font' => array(
-            'name'      =>  'Calibri',
-            'size'      =>  12,
-            'bold'      =>  true
-        )
-    ));
-
-### Styling with PHPExcel methods
-
-It's possible to style the sheets and specific cells with help of PHPExcel methods. This package includes a lot of shortcuts (see export documentation), but also always the use of the native methods.
-
-    // Set background color for a specific cell
-    $sheet->getStyle('A1')->applyFromArray(array(
-        'fill' => array(
-            'type'  => PHPExcel_Style_Fill::FILL_SOLID,
-            'color' => array('rgb' => 'FF0000')
-        )
-    ));
-
-### Using HTML tags
-
-Most of the HTML tags are supported.
-
-    
-
-        
-        

Big title

- - - Bold cell - Bold cell - - - Italic cell - - - - - - -> Inside the `view.php` config you can change how these tags will be interpreted by Excel by default. - -### Using HTML attributes - -Some of the basic styling can be done with HTML attributes. - - - - - Big title - - - Bold cell - - - Bold cell - - - Italic cell - - - Cell with width of 100 - - - Cell with height of 100 - - - -### Styling through inline-styles - -It's possible to use inline styles inside your view files. Most of the general styles are supported. - - - - - Cell - - - -> Inside the reference guide you can find a list of supported styles. - -### Styling through external CSS file - -Styling can be done through an external CSS file. - -External css file: - - #cell { - background-color: #000000; - color: #ffffff; - } - - .cell { - background-color: #000000; - color: #ffffff; - } - - tr td { - background-color: #ffffff; - } - - tr > td { - border-bottom: 1px solid #000000; - } - -Table: - - - - {{ HTML::style('css/table.css') }} - - - Cell - - - Cell - - - -> Inside the reference guide you can find a list of supported styles. - -> It's advised to include `` into the view to fix problems with UTF-8 encoding. \ No newline at end of file diff --git a/docs/blade/vars.md b/docs/blade/vars.md deleted file mode 100644 index ed5400121..000000000 --- a/docs/blade/vars.md +++ /dev/null @@ -1,19 +0,0 @@ -# Passing variables to the view - -### As parameter - -We can pass variables to the view by using the second parameter inside the `loadView()` method. - - $sheet->loadView('view', array('key' => 'value')); - -### With with() - -Alternatively you can use the `with()` method which works the same as with Laravel views. - - // Using normal with() - $sheet->loadView('view') - ->with('key', 'value'); - - // using dynamic with() - $sheet->loadView('view') - ->withKey('value'); \ No newline at end of file diff --git a/docs/borders.md b/docs/borders.md deleted file mode 100644 index 6207ac117..000000000 --- a/docs/borders.md +++ /dev/null @@ -1,14 +0,0 @@ -PHPExcel_Style_Border::BORDER_NONE = 'none' -PHPExcel_Style_Border::BORDER_DASHDOT = 'dashDot' -PHPExcel_Style_Border::BORDER_DASHDOTDOT = 'dashDotDot' -PHPExcel_Style_Border::BORDER_DASHED = 'dashed' -PHPExcel_Style_Border::BORDER_DOTTED = 'dotted' -PHPExcel_Style_Border::BORDER_DOUBLE = 'double' -PHPExcel_Style_Border::BORDER_HAIR = 'hair' -PHPExcel_Style_Border::BORDER_MEDIUM = 'medium' -PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT = 'mediumDashDot' -PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT = 'mediumDashDotDot' -PHPExcel_Style_Border::BORDER_MEDIUMDASHED = 'mediumDashed' -PHPExcel_Style_Border::BORDER_SLANTDASHDOT = 'slantDashDot' -PHPExcel_Style_Border::BORDER_THICK = 'thick' -PHPExcel_Style_Border::BORDER_THIN = 'thin' \ No newline at end of file diff --git a/docs/changelog.md b/docs/changelog.md deleted file mode 100644 index 0994c3950..000000000 --- a/docs/changelog.md +++ /dev/null @@ -1,2 +0,0 @@ -@include:Version 1|version-1 -@include:Version 2|version-2 diff --git a/docs/changelog/version-1.md b/docs/changelog/version-1.md deleted file mode 100644 index b80c89f6c..000000000 --- a/docs/changelog/version-1.md +++ /dev/null @@ -1,209 +0,0 @@ -# Version 1 - -### 1.3.5 -- PHPExcel 1.8.1 compatibility -- Clean-up ServiceProvider -- Fix short array syntax for PHP5.3 - -### 1.3.4 -- Fix usage of sheet callback when modifying an existing file -- Modifying existing files improvements (support style overriding) -- Add text-indent support to HtmlReader -- Add simple sheet password protection -- Add support for exporting multiple pdf pages -- Add inline cell formatting to blade - -### 1.3.3 -- Fix issue with different start row in chunk filter - -### 1.3.2 -- Custom value binders -- Html reader update - -### 1.3.1 -- Fix short array syntax - -### 1.3.0 -- Additional headers with export() -- Float, integer, string, timestamps problems -- Cell content ending by zeros -- Images in html -- Font family bug -- Setting row number of row with headings - -### 1.2.3 -- PDF writer -- Include charts config -- Chunk filter with selected sheet -- Compatibility fix with new PHPExcel release -- setDateColumns fix -- Optional dependencies to require-dev -- Several bugfixes - -### 1.2.2 -- Chunk filter fixes -- Isset() CellCollection fixes -- PHP 5.3 support -- Missing border styles -- Add CSV settings (delimiter, enclosure, lineEnding) to ExcelFile objects - -### 1.2.1 -- Fix with() method parameters - -### 1.2.0 -- Filters -- Chunk filter (with chunked importer) -- ExcelFile (method) injections -- NewExcelFile (method) injections -- Edit existing worksheets -- Converting existing worksheet -- Laravel 4.* + 5.0 support - -### 1.1.9 -- PHP 5.3 fixes - -### 1.1.8 -- PHP 5.3 support -- fromArray bugfix - -### 1.1.7 -- Fix heading generation for export with `->fromArray()` -- Bugfix for non-Unix kernels -- Enhanced CSS parser (thanks to `tijsverkoyen/CssToInlineStyles`) -- Support for nested CSS styles -- Support for multiple css attributes per class -- Support for internal and external CSS files -- Support for inline style blocks (`