Completed
Pull Request — develop (#47)
by
unknown
10:56
created
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.
src/PhpSpreadsheet/Shared/StringHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         for ($i = 0; $i <= 31; ++$i) {
91 91
             if ($i != 9 && $i != 10 && $i != 13) {
92
-                $find = '_x'.sprintf('%04s', strtoupper(dechex($i))).'_';
92
+                $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_';
93 93
                 $replace = chr($i);
94 94
                 self::$controlCharacters[$find] = $replace;
95 95
             }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
         // characters
489 489
         $chars = self::convertEncoding($value, 'UTF-16LE', 'UTF-8');
490 490
 
491
-        $data = pack('vC', $ln, $opt).$chars;
491
+        $data = pack('vC', $ln, $opt) . $chars;
492 492
 
493 493
         return $data;
494 494
     }
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     public static function convertEncoding($value, $to, $from)
506 506
     {
507 507
         if (self::getIsIconvEnabled()) {
508
-            return iconv($from, $to.'//IGNORE//TRANSLIT', $value);
508
+            return iconv($from, $to . '//IGNORE//TRANSLIT', $value);
509 509
         }
510 510
 
511 511
         if (self::getIsMbstringEnabled()) {
@@ -709,9 +709,9 @@  discard block
 block discarded – undo
709 709
      */
710 710
     public static function convertToNumberIfFraction(&$operand)
711 711
     {
712
-        if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) {
712
+        if (preg_match('/^' . self::STRING_REGEXP_FRACTION . '$/i', $operand, $match)) {
713 713
             $sign = ($match[1] == '-') ? '-' : '+';
714
-            $fractionFormula = '='.$sign.$match[2].$sign.$match[3];
714
+            $fractionFormula = '=' . $sign . $match[2] . $sign . $match[3];
715 715
             $operand = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($fractionFormula);
716 716
 
717 717
             return true;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Date.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $partDay = $partDay * 60 - $minutes;
202 202
         $seconds = round($partDay * 60);
203 203
 
204
-        $interval = '+'.$days.' days';
204
+        $interval = '+' . $days . ' days';
205 205
 
206 206
         return $baseDate->modify($interval)
207 207
             ->setTime($hours, $minutes, $seconds);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             return false;
279 279
         }
280 280
 
281
-        return self::dateTimeToExcel(new \DateTime('@'.$dateValue));
281
+        return self::dateTimeToExcel(new \DateTime('@' . $dateValue));
282 282
     }
283 283
 
284 284
     /**
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             return false;
410 410
         }
411 411
         // Try checking for any of the date formatting characters that don't appear within square braces
412
-        if (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $pFormatCode)) {
412
+        if (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $pFormatCode)) {
413 413
             //    We might also have a format mask containing quoted strings...
414 414
             //        we don't want to test for any of our characters within the quoted blocks
415 415
             if (strpos($pFormatCode, '"') !== false) {
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
                 foreach (explode('"', $pFormatCode) as $subVal) {
418 418
                     //    Only test in alternate array entries (the non-quoted blocks)
419 419
                     if (($segMatcher = !$segMatcher) &&
420
-                        (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $subVal))) {
420
+                        (preg_match('/(^|\])[^\[]*[' . self::$possibleDateFormatCharacters . ']/i', $subVal))) {
421 421
                         return true;
422 422
                     }
423 423
                 }
Please login to merge, or discard this patch.