Completed
Branch develop (6eff65)
by
unknown
22:48
created
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
             //    Two's Complement
1103 1103
             $x = substr($x, -9);
1104 1104
 
1105
-            return '-' . (512 - bindec($x));
1105
+            return '-'.(512 - bindec($x));
1106 1106
         }
1107 1107
 
1108 1108
         return bindec($x);
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
             return Functions::NAN();
1158 1158
         } elseif (strlen($x) == 10) {
1159 1159
             //    Two's Complement
1160
-            return str_repeat('F', 8) . substr(strtoupper(dechex(bindec(substr($x, -9)))), -2);
1160
+            return str_repeat('F', 8).substr(strtoupper(dechex(bindec(substr($x, -9)))), -2);
1161 1161
         }
1162 1162
         $hexVal = (string) strtoupper(dechex(bindec($x)));
1163 1163
 
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
             return Functions::NAN();
1213 1213
         } elseif (strlen($x) == 10) {
1214 1214
             //    Two's Complement
1215
-            return str_repeat('7', 7) . substr(strtoupper(decoct(bindec(substr($x, -9)))), -3);
1215
+            return str_repeat('7', 7).substr(strtoupper(decoct(bindec(substr($x, -9)))), -3);
1216 1216
         }
1217 1217
         $octVal = (string) decoct(bindec($x));
1218 1218
 
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
         $r = strtoupper(dechex($x));
1330 1330
         if (strlen($r) == 8) {
1331 1331
             //    Two's Complement
1332
-            $r = 'FF' . $r;
1332
+            $r = 'FF'.$r;
1333 1333
         }
1334 1334
 
1335 1335
         return self::nbrConversionFormat($r, $places);
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
         $eom = self::isLastDayOfMonth($result);
33 33
 
34 34
         while ($settlement < Date::PHPToExcel($result)) {
35
-            $result->modify('-' . $months . ' months');
35
+            $result->modify('-'.$months.' months');
36 36
         }
37 37
         if ($next) {
38
-            $result->modify('+' . $months . ' months');
38
+            $result->modify('+'.$months.' months');
39 39
         }
40 40
 
41 41
         if ($eom) {
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
             } elseif (!$conditionIsNumeric) {
732 732
                 continue;
733 733
             }
734
-            $testCondition = '=' . $arg . $condition;
734
+            $testCondition = '='.$arg.$condition;
735 735
             if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
736 736
                 $returnValue += $averageArgs[$key];
737 737
                 ++$aCount;
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             } elseif (!$conditionIsNumeric) {
1171 1171
                 continue;
1172 1172
             }
1173
-            $testCondition = '=' . $arg . $condition;
1173
+            $testCondition = '='.$arg.$condition;
1174 1174
             if (Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
1175 1175
                 // Is it a value within our criteria
1176 1176
                 ++$returnValue;
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
 
1235 1235
                     break; // if false found, don't need to check other conditions
1236 1236
                 }
1237
-                $testCondition = '=' . $arg . $condition;
1237
+                $testCondition = '='.$arg.$condition;
1238 1238
                 if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
1239 1239
                     // Is not a value within our criteria
1240 1240
                     $valid = false;
@@ -2263,7 +2263,7 @@  discard block
 block discarded – undo
2263 2263
                 if (!is_numeric($arg)) {
2264 2264
                     $arg = Calculation::wrapResult(strtoupper($arg));
2265 2265
                 }
2266
-                $testCondition = '=' . $arg . $condition;
2266
+                $testCondition = '='.$arg.$condition;
2267 2267
                 if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
2268 2268
                     // Is not a value within our criteria
2269 2269
                     $valid = false;
@@ -2443,7 +2443,7 @@  discard block
 block discarded – undo
2443 2443
                 if (!is_numeric($arg)) {
2444 2444
                     $arg = Calculation::wrapResult(strtoupper($arg));
2445 2445
                 }
2446
-                $testCondition = '=' . $arg . $condition;
2446
+                $testCondition = '='.$arg.$condition;
2447 2447
                 if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
2448 2448
                     // Is not a value within our criteria
2449 2449
                     $valid = false;
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
             $testConditionCount = 0;
68 68
             foreach ($criteria as $row => $criterion) {
69 69
                 if ($criterion[$key] > '') {
70
-                    $testCondition[] = '[:' . $criteriaName . ']' . Functions::ifCondition($criterion[$key]);
70
+                    $testCondition[] = '[:'.$criteriaName.']'.Functions::ifCondition($criterion[$key]);
71 71
                     ++$testConditionCount;
72 72
                 }
73 73
             }
74 74
             if ($testConditionCount > 1) {
75
-                $testConditions[] = 'OR(' . implode(',', $testCondition) . ')';
75
+                $testConditions[] = 'OR('.implode(',', $testCondition).')';
76 76
                 ++$testConditionsCount;
77 77
             } elseif ($testConditionCount == 1) {
78 78
                 $testConditions[] = $testCondition[0];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
 
83 83
         if ($testConditionsCount > 1) {
84
-            $testConditionSet = 'AND(' . implode(',', $testConditions) . ')';
84
+            $testConditionSet = 'AND('.implode(',', $testConditions).')';
85 85
         } elseif ($testConditionsCount == 1) {
86 86
             $testConditionSet = $testConditions[0];
87 87
         }
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
                 if (isset($dataValues[$k])) {
96 96
                     $dataValue = $dataValues[$k];
97 97
                     $dataValue = (is_string($dataValue)) ? Calculation::wrapResult(strtoupper($dataValue)) : $dataValue;
98
-                    $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList);
98
+                    $testConditionList = str_replace('[:'.$criteriaName.']', $dataValue, $testConditionList);
99 99
                 }
100 100
             }
101 101
             //    evaluate the criteria against the row data
102
-            $result = Calculation::getInstance()->_calculateFormulaValue('=' . $testConditionList);
102
+            $result = Calculation::getInstance()->_calculateFormulaValue('='.$testConditionList);
103 103
             //    If the row failed to meet the criteria, remove it from the database
104 104
             if (!$result) {
105 105
                 unset($database[$dataRow]);
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Token/Stack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
             while (is_array($value)) {
142 142
                 $value = array_pop($value);
143 143
             }
144
-            $str .= $value . ' |> ';
144
+            $str .= $value.' |> ';
145 145
         }
146 146
 
147 147
         return $str;
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             return Functions::VALUE();
95 95
         }
96 96
 
97
-        $args = array_filter($args, function ($value) {
97
+        $args = array_filter($args, function($value) {
98 98
             return $value !== null || (is_string($value) && trim($value) == '');
99 99
         });
100 100
         $argCount = count($args);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             return Functions::VALUE();
138 138
         }
139 139
 
140
-        $args = array_filter($args, function ($value) {
140
+        $args = array_filter($args, function($value) {
141 141
             return $value !== null || (is_string($value) && trim($value) == '');
142 142
         });
143 143
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             return Functions::VALUE();
181 181
         }
182 182
 
183
-        $args = array_filter($args, function ($value) {
183
+        $args = array_filter($args, function($value) {
184 184
             return $value !== null || (is_string($value) && trim($value) == '');
185 185
         });
186 186
 
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
         $t = self::romanCut($aValue, 10);
1120 1120
         $aValue %= 10;
1121 1121
 
1122
-        return $roman . $mill[$m] . $cent[$c] . $tens[$t] . $ones[$aValue];
1122
+        return $roman.$mill[$m].$cent[$c].$tens[$t].$ones[$aValue];
1123 1123
     }
1124 1124
 
1125 1125
     /**
@@ -1271,7 +1271,7 @@  discard block
 block discarded – undo
1271 1271
     {
1272 1272
         return array_filter(
1273 1273
             $args,
1274
-            function ($index) use ($cellReference) {
1274
+            function($index) use ($cellReference) {
1275 1275
                 [, $row, $column] = explode('.', $index);
1276 1276
 
1277 1277
                 return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() &&
@@ -1285,12 +1285,12 @@  discard block
 block discarded – undo
1285 1285
     {
1286 1286
         return array_filter(
1287 1287
             $args,
1288
-            function ($index) use ($cellReference) {
1288
+            function($index) use ($cellReference) {
1289 1289
                 [, $row, $column] = explode('.', $index);
1290
-                if ($cellReference->getWorksheet()->cellExists($column . $row)) {
1290
+                if ($cellReference->getWorksheet()->cellExists($column.$row)) {
1291 1291
                     //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
1292
-                    $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
1293
-                    $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
1292
+                    $isFormula = $cellReference->getWorksheet()->getCell($column.$row)->isFormula();
1293
+                    $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column.$row)->getValue());
1294 1294
 
1295 1295
                     return !$isFormula || $cellFormula;
1296 1296
                 }
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
                 $arg = Calculation::wrapResult(strtoupper($arg));
1422 1422
             }
1423 1423
 
1424
-            $testCondition = '=' . $arg . $condition;
1424
+            $testCondition = '='.$arg.$condition;
1425 1425
             $sumValue = array_key_exists($key, $sumArgs) ? $sumArgs[$key] : 0;
1426 1426
 
1427 1427
             if (is_numeric($sumValue) &&
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
                 if (!is_numeric($arg)) {
1477 1477
                     $arg = Calculation::wrapResult(strtoupper($arg));
1478 1478
                 }
1479
-                $testCondition = '=' . $arg . $condition;
1479
+                $testCondition = '='.$arg.$condition;
1480 1480
                 if (!Calculation::getInstance()->_calculateFormulaValue($testCondition)) {
1481 1481
                     // Is not a value within our criteria
1482 1482
                     $valid = false;
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Logger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@
 block discarded – undo
102 102
                     $message,
103 103
                     PHP_EOL;
104 104
             }
105
-            $this->debugLog[] = $cellReference .
106
-                ($this->cellStack->count() > 0 ? ' => ' : '') .
105
+            $this->debugLog[] = $cellReference.
106
+                ($this->cellStack->count() > 0 ? ' => ' : '').
107 107
                 $message;
108 108
         }
109 109
     }
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             return iconv('UCS-4LE', 'UTF-8', pack('V', $character));
35 35
         }
36 36
 
37
-        return mb_convert_encoding('&#' . (int) $character . ';', 'UTF-8', 'HTML-ENTITIES');
37
+        return mb_convert_encoding('&#'.(int) $character.';', 'UTF-8', 'HTML-ENTITIES');
38 38
     }
39 39
 
40 40
     /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         $mask = '$#,##0';
167 167
         if ($decimals > 0) {
168
-            $mask .= '.' . str_repeat('0', $decimals);
168
+            $mask .= '.'.str_repeat('0', $decimals);
169 169
         } else {
170 170
             $round = pow(10, abs($decimals));
171 171
             if ($value < 0) {
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
         $left = self::LEFT($oldText, $start - 1);
461 461
         $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1);
462 462
 
463
-        return $left . $newText . $right;
463
+        return $left.$newText.$right;
464 464
     }
465 465
 
466 466
     /**
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
             $numberValue = str_replace(
554 554
                 StringHelper::getThousandsSeparator(),
555 555
                 '',
556
-                trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode())
556
+                trim($value, " \t\n\r\0\x0B".StringHelper::getCurrencyCode())
557 557
             );
558 558
             if (is_numeric($numberValue)) {
559 559
                 return (float) $numberValue;
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
             $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator;
604 604
             $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator;
605 605
 
606
-            $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE);
606
+            $decimalPositions = preg_match_all('/'.preg_quote($decimalSeparator).'/', $value, $matches, PREG_OFFSET_CAPTURE);
607 607
             if ($decimalPositions > 1) {
608 608
                 return Functions::VALUE();
609 609
             }
Please login to merge, or discard this patch.