@@ -72,7 +72,7 @@ |
||
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 | /** |
@@ -87,7 +87,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -72,7 +72,7 @@ |
||
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 | /** |
@@ -99,12 +99,12 @@ discard block |
||
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 |
||
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)) { |
@@ -72,7 +72,7 @@ |
||
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 | /** |
@@ -72,7 +72,7 @@ |
||
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 | /** |
@@ -154,6 +154,6 @@ |
||
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 | } |
@@ -177,21 +177,21 @@ |
||
177 | 177 | $ret = str_pad($this->Name, 64, "\x00"); |
178 | 178 | |
179 | 179 | $ret .= pack('v', strlen($this->Name) + 2) // 66 |
180 | - .pack('c', $this->Type) // 67 |
|
181 | - .pack('c', 0x00) //UK // 68 |
|
182 | - .pack('V', $this->PrevPps) //Prev // 72 |
|
183 | - .pack('V', $this->NextPps) //Next // 76 |
|
184 | - .pack('V', $this->DirPps) //Dir // 80 |
|
185 | - ."\x00\x09\x02\x00" // 84 |
|
186 | - ."\x00\x00\x00\x00" // 88 |
|
187 | - ."\xc0\x00\x00\x00" // 92 |
|
188 | - ."\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | - ."\x00\x00\x00\x00" // 100 |
|
190 | - .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
191 | - .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
192 | - .pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
193 | - .pack('V', $this->Size) // 124 |
|
194 | - .pack('V', 0); // 128 |
|
180 | + .pack('c', $this->Type) // 67 |
|
181 | + .pack('c', 0x00) //UK // 68 |
|
182 | + .pack('V', $this->PrevPps) //Prev // 72 |
|
183 | + .pack('V', $this->NextPps) //Next // 76 |
|
184 | + .pack('V', $this->DirPps) //Dir // 80 |
|
185 | + ."\x00\x09\x02\x00" // 84 |
|
186 | + ."\x00\x00\x00\x00" // 88 |
|
187 | + ."\xc0\x00\x00\x00" // 92 |
|
188 | + ."\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | + ."\x00\x00\x00\x00" // 100 |
|
190 | + .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
191 | + .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
192 | + .pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
193 | + .pack('V', $this->Size) // 124 |
|
194 | + .pack('V', 0); // 128 |
|
195 | 195 | return $ret; |
196 | 196 | } |
197 | 197 |
@@ -219,12 +219,12 @@ |
||
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'); |