Completed
Pull Request — develop (#47)
by
unknown
10:56
created
src/PhpSpreadsheet/Shared/Trend/Trend.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             trigger_error('Trend(): Number of elements in coordinate arrays do not match.', E_USER_ERROR);
88 88
         }
89 89
 
90
-        $key = md5($trendType.$const.serialize($yValues).serialize($xValues));
90
+        $key = md5($trendType . $const . serialize($yValues) . serialize($xValues));
91 91
         //    Determine which Trend method has been requested
92 92
         switch ($trendType) {
93 93
             //    Instantiate and return the class for the requested Trend method
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             case self::TREND_EXPONENTIAL:
97 97
             case self::TREND_POWER:
98 98
                 if (!isset(self::$trendCache[$key])) {
99
-                    $className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\'.$trendType.'BestFit';
99
+                    $className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendType . 'BestFit';
100 100
                     self::$trendCache[$key] = new $className($yValues, $xValues, $const);
101 101
                 }
102 102
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 //    If the request is to determine the best fit regression, then we test each Trend line in turn
118 118
                 //    Start by generating an instance of each available Trend method
119 119
                 foreach (self::$trendTypes as $trendMethod) {
120
-                    $className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\'.$trendType.'BestFit';
120
+                    $className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendType . 'BestFit';
121 121
                     $bestFit[$trendMethod] = new $className($yValues, $xValues, $const);
122 122
                     $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit();
123 123
                 }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $slope = $this->getSlope($dp);
73 73
         $intersect = $this->getIntersect($dp);
74 74
 
75
-        return 'Y = '.$intersect.' + '.$slope.' * X';
75
+        return 'Y = ' . $intersect . ' + ' . $slope . ' * X';
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         $slope = $this->getSlope($dp);
100 100
         $intersect = $this->getIntersect($dp);
101 101
 
102
-        $equation = 'Y = '.$intersect;
102
+        $equation = 'Y = ' . $intersect;
103 103
         foreach ($slope as $key => $value) {
104 104
             if ($value != 0.0) {
105
-                $equation .= ' + '.$value.' * X';
105
+                $equation .= ' + ' . $value . ' * X';
106 106
                 if ($key > 0) {
107
-                    $equation .= '^'.($key + 1);
107
+                    $equation .= '^' . ($key + 1);
108 108
                 }
109 109
             }
110 110
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     {
208 208
         if (parent::__construct($yValues, $xValues) !== false) {
209 209
             if ($order < $this->valueCount) {
210
-                $this->bestFitType .= '_'.$order;
210
+                $this->bestFitType .= '_' . $order;
211 211
                 $this->order = $order;
212 212
                 $this->polynomialRegression($order, $yValues, $xValues, $const);
213 213
                 if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $slope = $this->getSlope($dp);
73 73
         $intersect = $this->getIntersect($dp);
74 74
 
75
-        return 'Y = '.$intersect.' + '.$slope.' * log(X)';
75
+        return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)';
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $slope = $this->getSlope($dp);
73 73
         $intersect = $this->getIntersect($dp);
74 74
 
75
-        return 'Y = '.$intersect.' * '.$slope.'^X';
75
+        return 'Y = ' . $intersect . ' * ' . $slope . '^X';
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/ZipArchive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace PhpOffice\PhpSpreadsheet\Shared;
4 4
 
5 5
 if (!defined('PCLZIP_TEMPORARY_DIR')) {
6
-    define('PCLZIP_TEMPORARY_DIR', File::sysGetTempDir().DIRECTORY_SEPARATOR);
6
+    define('PCLZIP_TEMPORARY_DIR', File::sysGetTempDir() . DIRECTORY_SEPARATOR);
7 7
 }
8 8
 
9 9
 use PhpOffice\PhpSpreadsheet\Shared\PCLZip\PclZip;
@@ -86,16 +86,16 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $filenameParts = pathinfo($localname);
88 88
 
89
-        $handle = fopen($this->tempDir.'/'.$filenameParts['basename'], 'wb');
89
+        $handle = fopen($this->tempDir . '/' . $filenameParts['basename'], 'wb');
90 90
         fwrite($handle, $contents);
91 91
         fclose($handle);
92 92
 
93
-        $res = $this->zip->add($this->tempDir.'/'.$filenameParts['basename'], PCLZIP_OPT_REMOVE_PATH, $this->tempDir, PCLZIP_OPT_ADD_PATH, $filenameParts['dirname']);
93
+        $res = $this->zip->add($this->tempDir . '/' . $filenameParts['basename'], PCLZIP_OPT_REMOVE_PATH, $this->tempDir, PCLZIP_OPT_ADD_PATH, $filenameParts['dirname']);
94 94
         if ($res == 0) {
95
-            throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('Error zipping files : '.$this->zip->errorInfo(true));
95
+            throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('Error zipping files : ' . $this->zip->errorInfo(true));
96 96
         }
97 97
 
98
-        unlink($this->tempDir.'/'.$filenameParts['basename']);
98
+        unlink($this->tempDir . '/' . $filenameParts['basename']);
99 99
     }
100 100
 
101 101
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/CodePage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,6 +154,6 @@
 block discarded – undo
154 154
             case 65001:
155 155
                 return 'UTF-8'; //    Unicode (UTF-8)
156 156
         }
157
-        throw new \PhpOffice\PhpSpreadsheet\Exception('Unknown codepage: '.$codePage);
157
+        throw new \PhpOffice\PhpSpreadsheet\Exception('Unknown codepage: ' . $codePage);
158 158
     }
159 159
 }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS/Root.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
                 .pack('V', 0)// Extra BDList Count
235 235
             );
236 236
         } else {
237
-            fwrite($FILE, pack('V', $iAll + $iBdCnt).pack('V', $iBdExL));
237
+            fwrite($FILE, pack('V', $iAll + $iBdCnt) . pack('V', $iBdExL));
238 238
         }
239 239
 
240 240
         // BDList
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -219,12 +219,12 @@
 block discarded – undo
219 219
         $GLOBALS['_OLE_INSTANCES'][] = $this;
220 220
         $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES']));
221 221
 
222
-        $path = 'ole-chainedblockstream://oleInstanceId='.$instanceId;
222
+        $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId;
223 223
         if ($blockIdOrPps instanceof OLE\PPS) {
224
-            $path .= '&blockId='.$blockIdOrPps->startBlock;
225
-            $path .= '&size='.$blockIdOrPps->Size;
224
+            $path .= '&blockId=' . $blockIdOrPps->startBlock;
225
+            $path .= '&size=' . $blockIdOrPps->Size;
226 226
         } else {
227
-            $path .= '&blockId='.$blockIdOrPps;
227
+            $path .= '&blockId=' . $blockIdOrPps;
228 228
         }
229 229
 
230 230
         return fopen($path, 'r');
Please login to merge, or discard this patch.