Skip to content

Commit

Permalink
Removed unnecessary local variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
nursultanturdaliev committed May 10, 2016
1 parent 728c2bf commit 1c32318
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,9 @@ public function __construct($phpExcelIO = '\PHPExcel_IOFactory')
*
* @return \PHPExcel
*/
public function createPHPExcelObject($filename = null)
public function createPHPExcelObject($filename = null)
{
if (null === $filename) {
$phpExcelObject = new \PHPExcel();

return $phpExcelObject;
}

return call_user_func(array($this->phpExcelIO, 'load'), $filename);
return (null === $filename) ? new \PHPExcel() : call_user_func(array($this->phpExcelIO, 'load'), $filename);
}

/**
Expand All @@ -42,9 +36,7 @@ public function createPHPExcelObject($filename = null)
*/
public function createPHPExcelWorksheetDrawing()
{
$Object = new \PHPExcel_Worksheet_Drawing();

return $Object;
return new \PHPExcel_Worksheet_Drawing();
}

/**
Expand Down Expand Up @@ -89,7 +81,6 @@ function () use ($writer) {
*/
public function createHelperHTML()
{
$Object = new \PHPExcel_Helper_HTML();
return $Object;
return new \PHPExcel_Helper_HTML();
}
}

0 comments on commit 1c32318

Please sign in to comment.