Completed
Pull Request — develop (#47)
by
unknown
10:56
created
src/PhpSpreadsheet/Cell/AdvancedValueBinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             }
61 61
 
62 62
             // Check for number in scientific format
63
-            if (preg_match('/^'.\PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) {
63
+            if (preg_match('/^' . \PhpOffice\PhpSpreadsheet\Calculation::CALCULATION_REGEXP_NUMBER . '$/', $value)) {
64 64
                 $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC);
65 65
 
66 66
                 return true;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $currencyCode = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::getCurrencyCode();
110 110
             $decimalSeparator = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::getDecimalSeparator();
111 111
             $thousandsSeparator = \PhpOffice\PhpSpreadsheet\Shared\StringHelper::getThousandsSeparator();
112
-            if (preg_match('/^'.preg_quote($currencyCode).' *(\d{1,3}('.preg_quote($thousandsSeparator).'\d{3})*|(\d+))('.preg_quote($decimalSeparator).'\d{2})?$/', $value)) {
112
+            if (preg_match('/^' . preg_quote($currencyCode) . ' *(\d{1,3}(' . preg_quote($thousandsSeparator) . '\d{3})*|(\d+))(' . preg_quote($decimalSeparator) . '\d{2})?$/', $value)) {
113 113
                 // Convert value to number
114 114
                 $value = (float) trim(str_replace([$currencyCode, $thousandsSeparator, $decimalSeparator], ['', '', '.'], $value));
115 115
                 $cell->setValueExplicit($value, DataType::TYPE_NUMERIC);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell/DataValidation.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -471,19 +471,19 @@
 block discarded – undo
471 471
     public function getHashCode()
472 472
     {
473 473
         return md5(
474
-            $this->formula1.
475
-            $this->formula2.
476
-            $this->type = self::TYPE_NONE.
477
-            $this->errorStyle = self::STYLE_STOP.
478
-            $this->operator.
479
-            ($this->allowBlank ? 't' : 'f').
480
-            ($this->showDropDown ? 't' : 'f').
481
-            ($this->showInputMessage ? 't' : 'f').
482
-            ($this->showErrorMessage ? 't' : 'f').
483
-            $this->errorTitle.
484
-            $this->error.
485
-            $this->promptTitle.
486
-            $this->prompt.
474
+            $this->formula1 .
475
+            $this->formula2 .
476
+            $this->type = self::TYPE_NONE .
477
+            $this->errorStyle = self::STYLE_STOP .
478
+            $this->operator .
479
+            ($this->allowBlank ? 't' : 'f') .
480
+            ($this->showDropDown ? 't' : 'f') .
481
+            ($this->showInputMessage ? 't' : 'f') .
482
+            ($this->showErrorMessage ? 't' : 'f') .
483
+            $this->errorTitle .
484
+            $this->error .
485
+            $this->promptTitle .
486
+            $this->prompt .
487 487
             __CLASS__
488 488
         );
489 489
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell/Hyperlink.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,8 @@
 block discarded – undo
121 121
     public function getHashCode()
122 122
     {
123 123
         return md5(
124
-            $this->url.
125
-            $this->tooltip.
124
+            $this->url .
125
+            $this->tooltip .
126 126
             __CLASS__
127 127
         );
128 128
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/CalcEngine/Logger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@
 block discarded – undo
126 126
                     $message,
127 127
                     PHP_EOL;
128 128
             }
129
-            $this->debugLog[] = $cellReference.
130
-                ($this->cellStack->count() > 0 ? ' => ' : '').
129
+            $this->debugLog[] = $cellReference .
130
+                ($this->cellStack->count() > 0 ? ' => ' : '') .
131 131
                 $message;
132 132
         }
133 133
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLERead.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         // Check if file exists and is readable
80 80
         if (!is_readable($sFileName)) {
81
-            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('Could not open '.$sFileName.' for reading! File does not exist, or it is not readable.');
81
+            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('Could not open ' . $sFileName . ' for reading! File does not exist, or it is not readable.');
82 82
         }
83 83
 
84 84
         // Get the file identifier
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         // Check OLE identifier
89 89
         if ($this->data != self::IDENTIFIER_OLE) {
90
-            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('The filename '.$sFileName.' is not recognised as an OLE file');
90
+            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('The filename ' . $sFileName . ' is not recognised as an OLE file');
91 91
         }
92 92
 
93 93
         // Get the file data
@@ -283,12 +283,12 @@  discard block
 block discarded – undo
283 283
             }
284 284
 
285 285
             // Summary information
286
-            if ($name == chr(5).'SummaryInformation') {
286
+            if ($name == chr(5) . 'SummaryInformation') {
287 287
                 $this->summaryInformation = count($this->props) - 1;
288 288
             }
289 289
 
290 290
             // Additional Document Summary information
291
-            if ($name == chr(5).'DocumentSummaryInformation') {
291
+            if ($name == chr(5) . 'DocumentSummaryInformation') {
292 292
                 $this->documentSummaryInformation = count($this->props) - 1;
293 293
             }
294 294
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
             throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('Parameter data is empty.');
312 312
         } elseif ($pos < 0) {
313 313
             // Invalid position
314
-            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('Parameter pos='.$pos.' is invalid.');
314
+            throw new \PhpOffice\PhpSpreadsheet\Reader\Exception('Parameter pos=' . $pos . ' is invalid.');
315 315
         }
316 316
 
317 317
         $len = strlen($data);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Xls.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,8 +287,8 @@
 block discarded – undo
287 287
         $x2 = ($width + 1) / self::sizeCol($sheet, \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object
288 288
         $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object
289 289
 
290
-        $startCoordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($col_start).($row_start + 1);
291
-        $endCoordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($col_end).($row_end + 1);
290
+        $startCoordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($col_start) . ($row_start + 1);
291
+        $endCoordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($col_end) . ($row_end + 1);
292 292
 
293 293
         $twoAnchor = [
294 294
             'startCoordinates' => $startCoordinates,
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/TimeZone.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
     {
121 121
         if ($timezone !== null) {
122 122
             if (!self::validateTimezone($timezone)) {
123
-                throw new \PhpOffice\PhpSpreadsheet\Exception('Invalid timezone '.$timezone);
123
+                throw new \PhpOffice\PhpSpreadsheet\Exception('Invalid timezone ' . $timezone);
124 124
             }
125 125
         } else {
126 126
             $timezone = self::$timezone;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Trend/PowerBestFit.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.' * X^'.$slope;
75
+        return 'Y = ' . $intersect . ' * X^' . $slope;
76 76
     }
77 77
 
78 78
     /**
Please login to merge, or discard this patch.
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.