Skip to content

Commit 7325755

Browse files
committed
Merge pull request #105 from nurolopher/master
Removed unnecessary local variables.
2 parents 728c2bf + 1c32318 commit 7325755

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

Factory.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,9 @@ public function __construct($phpExcelIO = '\PHPExcel_IOFactory')
2525
*
2626
* @return \PHPExcel
2727
*/
28-
public function createPHPExcelObject($filename = null)
28+
public function createPHPExcelObject($filename = null)
2929
{
30-
if (null === $filename) {
31-
$phpExcelObject = new \PHPExcel();
32-
33-
return $phpExcelObject;
34-
}
35-
36-
return call_user_func(array($this->phpExcelIO, 'load'), $filename);
30+
return (null === $filename) ? new \PHPExcel() : call_user_func(array($this->phpExcelIO, 'load'), $filename);
3731
}
3832

3933
/**
@@ -42,9 +36,7 @@ public function createPHPExcelObject($filename = null)
4236
*/
4337
public function createPHPExcelWorksheetDrawing()
4438
{
45-
$Object = new \PHPExcel_Worksheet_Drawing();
46-
47-
return $Object;
39+
return new \PHPExcel_Worksheet_Drawing();
4840
}
4941

5042
/**
@@ -89,7 +81,6 @@ function () use ($writer) {
8981
*/
9082
public function createHelperHTML()
9183
{
92-
$Object = new \PHPExcel_Helper_HTML();
93-
return $Object;
84+
return new \PHPExcel_Helper_HTML();
9485
}
9586
}

0 commit comments

Comments
 (0)