Completed
Branch develop (aa6d31)
by
unknown
24:05
created
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.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         if ($sheetText > '') {
46 46
             if (strpos($sheetText, ' ') !== false) {
47
-                $sheetText = "'" . $sheetText . "'";
47
+                $sheetText = "'".$sheetText."'";
48 48
             }
49 49
             $sheetText .= '!';
50 50
         }
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
                 $rowRelative = '';
59 59
             }
60 60
 
61
-            return $sheetText . $columnRelative . $column . $rowRelative . $row;
61
+            return $sheetText.$columnRelative.$column.$rowRelative.$row;
62 62
         }
63 63
         if (($relativity == 2) || ($relativity == 4)) {
64
-            $column = '[' . $column . ']';
64
+            $column = '['.$column.']';
65 65
         }
66 66
         if (($relativity == 3) || ($relativity == 4)) {
67
-            $row = '[' . $row . ']';
67
+            $row = '['.$row.']';
68 68
         }
69 69
 
70
-        return $sheetText . 'R' . $row . 'C' . $column;
70
+        return $sheetText.'R'.$row.'C'.$column;
71 71
     }
72 72
 
73 73
     /**
@@ -288,9 +288,9 @@  discard block
 block discarded – undo
288 288
             [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);
289 289
         }
290 290
 
291
-        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
292
-            (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))) {
293
-            if (!preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $cellAddress1, $matches)) {
291
+        if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress1, $matches)) ||
292
+            (($cellAddress2 !== null) && (!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress2, $matches)))) {
293
+            if (!preg_match('/^'.Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $cellAddress1, $matches)) {
294 294
                 return Functions::REF();
295 295
             }
296 296
 
@@ -396,9 +396,9 @@  discard block
 block discarded – undo
396 396
         }
397 397
         $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1);
398 398
 
399
-        $cellAddress = $startCellColumn . $startCellRow;
399
+        $cellAddress = $startCellColumn.$startCellRow;
400 400
         if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {
401
-            $cellAddress .= ':' . $endCellColumn . $endCellRow;
401
+            $cellAddress .= ':'.$endCellColumn.$endCellRow;
402 402
         }
403 403
 
404 404
         if ($sheetName !== null) {
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
                 if ($matchType === 0) {
535 535
                     if ($typeMatch && is_string($lookupValue) && (bool) preg_match('/([\?\*])/', $lookupValue)) {
536 536
                         $splitString = $lookupValue;
537
-                        $chars = array_map(function ($i) use ($splitString) {
537
+                        $chars = array_map(function($i) use ($splitString) {
538 538
                             return mb_substr($splitString, $i, 1);
539 539
                         }, range(0, mb_strlen($splitString) - 1));
540 540
 
@@ -951,9 +951,9 @@  discard block
 block discarded – undo
951 951
             return Functions::REF();
952 952
         }
953 953
 
954
-        preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
954
+        preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellReference, $matches);
955 955
 
956
-        $cellReference = $matches[6] . $matches[7];
956
+        $cellReference = $matches[6].$matches[7];
957 957
         $worksheetName = trim($matches[3], "'");
958 958
         $worksheet = (!empty($worksheetName))
959 959
             ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName)
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 
110 110
         $adjustmentMonthsString = (string) $adjustmentMonths;
111 111
         if ($adjustmentMonths > 0) {
112
-            $adjustmentMonthsString = '+' . $adjustmentMonths;
112
+            $adjustmentMonthsString = '+'.$adjustmentMonths;
113 113
         }
114 114
         if ($adjustmentMonths != 0) {
115
-            $PHPDateObject->modify($adjustmentMonthsString . ' months');
115
+            $PHPDateObject->modify($adjustmentMonthsString.' months');
116 116
         }
117 117
         $nMonth = (int) $PHPDateObject->format('m');
118 118
         $nYear = (int) $PHPDateObject->format('Y');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
121 121
         if ($monthDiff != $adjustmentMonths) {
122 122
             $adjustDays = (int) $PHPDateObject->format('d');
123
-            $adjustDaysString = '-' . $adjustDays . ' days';
123
+            $adjustDaysString = '-'.$adjustDays.' days';
124 124
             $PHPDateObject->modify($adjustDaysString);
125 125
         }
126 126
 
@@ -434,9 +434,9 @@  discard block
 block discarded – undo
434 434
                     $dayAdjust = floor($hour / 24);
435 435
                     $hour = $hour % 24;
436 436
                 }
437
-                $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);
437
+                $phpDateObject = new \DateTime('1900-01-01 '.$hour.':'.$minute.':'.$second);
438 438
                 if ($dayAdjust != 0) {
439
-                    $phpDateObject->modify($dayAdjust . ' days');
439
+                    $phpDateObject->modify($dayAdjust.' days');
440 440
                 }
441 441
 
442 442
                 return $phpDateObject;
@@ -529,9 +529,9 @@  discard block
 block discarded – undo
529 529
             if ($testVal1 < 31 && $testVal2 < 12 && $testVal3 < 12 && strlen($testVal3) == 2) {
530 530
                 $testVal3 += 2000;
531 531
             }
532
-            $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3);
532
+            $PHPDateArray = date_parse($testVal1.'-'.$testVal2.'-'.$testVal3);
533 533
             if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
534
-                $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3);
534
+                $PHPDateArray = date_parse($testVal2.'-'.$testVal1.'-'.$testVal3);
535 535
                 if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
536 536
                     return Functions::VALUE();
537 537
                 }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
                 case Functions::RETURNDATE_UNIX_TIMESTAMP:
572 572
                     return (int) Date::excelToTimestamp($excelDateValue);
573 573
                 case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
574
-                    return new \DateTime($PHPDateArray['year'] . '-' . $PHPDateArray['month'] . '-' . $PHPDateArray['day'] . ' 00:00:00');
574
+                    return new \DateTime($PHPDateArray['year'].'-'.$PHPDateArray['month'].'-'.$PHPDateArray['day'].' 00:00:00');
575 575
             }
576 576
         }
577 577
 
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
                 case Functions::RETURNDATE_UNIX_TIMESTAMP:
634 634
                     return (int) $phpDateValue = Date::excelToTimestamp($excelDateValue + 25569) - 3600;
635 635
                 case Functions::RETURNDATE_PHP_DATETIME_OBJECT:
636
-                    return new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);
636
+                    return new \DateTime('1900-01-01 '.$PHPDateArray['hour'].':'.$PHPDateArray['minute'].':'.$PHPDateArray['second']);
637 637
             }
638 638
         }
639 639
 
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
             case 'MD':
712 712
                 if ($endDays < $startDays) {
713 713
                     $retVal = $endDays;
714
-                    $PHPEndDateObject->modify('-' . $endDays . ' days');
714
+                    $PHPEndDateObject->modify('-'.$endDays.' days');
715 715
                     $adjustDays = $PHPEndDateObject->format('j');
716 716
                     $retVal += ($adjustDays - $startDays);
717 717
                 } else {
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
             return (int) $PHPDateObject->format('W');
1365 1365
         }
1366 1366
         $dayOfYear = $PHPDateObject->format('z');
1367
-        $PHPDateObject->modify('-' . $dayOfYear . ' days');
1367
+        $PHPDateObject->modify('-'.$dayOfYear.' days');
1368 1368
         $firstDayOfFirstWeek = $PHPDateObject->format('w');
1369 1369
         $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7;
1370 1370
         $daysInFirstWeek += 7 * !$daysInFirstWeek;
@@ -1676,7 +1676,7 @@  discard block
 block discarded – undo
1676 1676
         // Execute function
1677 1677
         $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1);
1678 1678
         $adjustDays = (int) $PHPDateObject->format('d');
1679
-        $adjustDaysString = '-' . $adjustDays . ' days';
1679
+        $adjustDaysString = '-'.$adjustDays.' days';
1680 1680
         $PHPDateObject->modify($adjustDaysString);
1681 1681
 
1682 1682
         switch (Functions::getReturnDateType()) {
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
                 $condition = Calculation::wrapResult(strtoupper($condition));
281 281
             }
282 282
 
283
-            return str_replace('""""', '""', '=' . $condition);
283
+            return str_replace('""""', '""', '='.$condition);
284 284
         }
285 285
         preg_match('/(=|<[>=]?|>=?)(.*)/', $condition, $matches);
286 286
         [, $operator, $operand] = $matches;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             $operand = Calculation::wrapResult(strtoupper($operand));
293 293
         }
294 294
 
295
-        return str_replace('""""', '""', $operator . $operand);
295
+        return str_replace('""""', '""', $operator.$operand);
296 296
     }
297 297
 
298 298
     /**
@@ -622,10 +622,10 @@  discard block
 block discarded – undo
622 622
                 foreach ($value as $k2 => $val) {
623 623
                     if (is_array($val)) {
624 624
                         foreach ($val as $k3 => $v) {
625
-                            $arrayValues[$k1 . '.' . $k2 . '.' . $k3] = $v;
625
+                            $arrayValues[$k1.'.'.$k2.'.'.$k3] = $v;
626 626
                         }
627 627
                     } else {
628
-                        $arrayValues[$k1 . '.' . $k2] = $val;
628
+                        $arrayValues[$k1.'.'.$k2] = $val;
629 629
                     }
630 630
                 }
631 631
             } else {
@@ -666,9 +666,9 @@  discard block
 block discarded – undo
666 666
             return self::REF();
667 667
         }
668 668
 
669
-        preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
669
+        preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellReference, $matches);
670 670
 
671
-        $cellReference = $matches[6] . $matches[7];
671
+        $cellReference = $matches[6].$matches[7];
672 672
         $worksheetName = trim($matches[3], "'");
673 673
 
674 674
         $worksheet = (!empty($worksheetName))
Please login to merge, or discard this patch.
htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public static function setChartRenderer($rendererClass)
68 68
     {
69 69
         if (!is_a($rendererClass, IRenderer::class, true)) {
70
-            throw new Exception('Chart renderer must implement ' . IRenderer::class);
70
+            throw new Exception('Chart renderer must implement '.IRenderer::class);
71 71
         }
72 72
 
73 73
         self::$chartRenderer = $rendererClass;
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function getPageHeading()
66 66
     {
67
-        return $this->isIndex() ? '' : '<h1>' . str_replace('_', ' ', $this->getScriptFilename()) . '</h1>';
67
+        return $this->isIndex() ? '' : '<h1>'.str_replace('_', ' ', $this->getScriptFilename()).'</h1>';
68 68
     }
69 69
 
70 70
     /**
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
     public function getSamples()
76 76
     {
77 77
         // Populate samples
78
-        $baseDir = realpath(__DIR__ . '/../../../samples');
78
+        $baseDir = realpath(__DIR__.'/../../../samples');
79 79
         $directory = new RecursiveDirectoryIterator($baseDir);
80 80
         $iterator = new RecursiveIteratorIterator($directory);
81 81
         $regex = new RegexIterator($iterator, '/^.+\.php$/', RecursiveRegexIterator::GET_MATCH);
82 82
 
83 83
         $files = [];
84 84
         foreach ($regex as $file) {
85
-            $file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
85
+            $file = str_replace(str_replace('\\', '/', $baseDir).'/', '', str_replace('\\', '/', $file[0]));
86 86
             $info = pathinfo($file);
87 87
             $category = str_replace('_', ' ', $info['dirname']);
88 88
             $name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename']));
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     private function getTemporaryFolder()
141 141
     {
142
-        $tempFolder = sys_get_temp_dir() . '/phpspreadsheet';
142
+        $tempFolder = sys_get_temp_dir().'/phpspreadsheet';
143 143
         if (!is_dir($tempFolder)) {
144 144
             if (!mkdir($tempFolder) && !is_dir($tempFolder)) {
145 145
                 throw new \RuntimeException(sprintf('Directory "%s" was not created', $tempFolder));
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     {
162 162
         $originalExtension = pathinfo($filename, PATHINFO_EXTENSION);
163 163
 
164
-        return $this->getTemporaryFolder() . '/' . str_replace('.' . $originalExtension, '.' . $extension, basename($filename));
164
+        return $this->getTemporaryFolder().'/'.str_replace('.'.$originalExtension, '.'.$extension, basename($filename));
165 165
     }
166 166
 
167 167
     /**
@@ -176,13 +176,13 @@  discard block
 block discarded – undo
176 176
         $temporaryFilename = tempnam($this->getTemporaryFolder(), 'phpspreadsheet-');
177 177
         unlink($temporaryFilename);
178 178
 
179
-        return $temporaryFilename . '.' . $extension;
179
+        return $temporaryFilename.'.'.$extension;
180 180
     }
181 181
 
182 182
     public function log($message)
183 183
     {
184 184
         $eol = $this->isCli() ? PHP_EOL : '<br />';
185
-        echo date('H:i:s ') . $message . $eol;
185
+        echo date('H:i:s ').$message.$eol;
186 186
     }
187 187
 
188 188
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     public function logEndingNotes()
192 192
     {
193 193
         // Do not show execution time for index
194
-        $this->log('Peak memory usage: ' . (memory_get_peak_usage(true) / 1024 / 1024) . 'MB');
194
+        $this->log('Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).'MB');
195 195
     }
196 196
 
197 197
     /**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $callTime = $callEndTime - $callStartTime;
208 208
         $reflection = new ReflectionClass($writer);
209 209
         $format = $reflection->getShortName();
210
-        $message = "Write {$format} format to <code>{$path}</code>  in " . sprintf('%.4f', $callTime) . ' seconds';
210
+        $message = "Write {$format} format to <code>{$path}</code>  in ".sprintf('%.4f', $callTime).' seconds';
211 211
 
212 212
         $this->log($message);
213 213
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     {
224 224
         $callEndTime = microtime(true);
225 225
         $callTime = $callEndTime - $callStartTime;
226
-        $message = "Read {$format} format from <code>{$path}</code>  in " . sprintf('%.4f', $callTime) . ' seconds';
226
+        $message = "Read {$format} format from <code>{$path}</code>  in ".sprintf('%.4f', $callTime).' seconds';
227 227
 
228 228
         $this->log($message);
229 229
     }
Please login to merge, or discard this patch.
htdocs/includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
         //    Load the HTML file into the DOM object
620 620
         //  Note the use of error suppression, because typically this will be an html fragment, so not fully valid markup
621 621
         $prefix = '<?xml encoding="UTF-8">';
622
-        @$dom->loadHTML($prefix . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
622
+        @$dom->loadHTML($prefix.$html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
623 623
         //    Discard excess white space
624 624
         $dom->preserveWhiteSpace = false;
625 625
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
             $richtextRun->getFont()->setSize($this->size);
662 662
         }
663 663
         if ($this->color) {
664
-            $richtextRun->getFont()->setColor(new Color('ff' . $this->color));
664
+            $richtextRun->getFont()->setColor(new Color('ff'.$this->color));
665 665
         }
666 666
         if ($this->bold) {
667 667
             $richtextRun->getFont()->setBold(true);
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Migrator.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $prefixedClasses = [];
249 249
         foreach ($classes as $key => &$value) {
250 250
             $value = str_replace('PhpOffice\\', '\\PhpOffice\\', $value);
251
-            $prefixedClasses['\\' . $key] = $value;
251
+            $prefixedClasses['\\'.$key] = $value;
252 252
         }
253 253
         $mapping = $prefixedClasses + $classes + $methods;
254 254
 
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
         ];
276 276
 
277 277
         foreach ($patterns as $pattern) {
278
-            foreach (glob($path . $pattern) as $file) {
278
+            foreach (glob($path.$pattern) as $file) {
279 279
                 if (strpos($path, '/vendor/') !== false) {
280
-                    echo $file . " skipped\n";
280
+                    echo $file." skipped\n";
281 281
 
282 282
                     continue;
283 283
                 }
@@ -285,15 +285,15 @@  discard block
 block discarded – undo
285 285
                 $converted = $this->replace($original);
286 286
 
287 287
                 if ($original !== $converted) {
288
-                    echo $file . " converted\n";
288
+                    echo $file." converted\n";
289 289
                     file_put_contents($file, $converted);
290 290
                 }
291 291
             }
292 292
         }
293 293
 
294 294
         // Do the recursion in subdirectory
295
-        foreach (glob($path . '/*', GLOB_ONLYDIR) as $subpath) {
296
-            if (strpos($subpath, $path . '/') === 0) {
295
+        foreach (glob($path.'/*', GLOB_ONLYDIR) as $subpath) {
296
+            if (strpos($subpath, $path.'/') === 0) {
297 297
                 $this->recursiveReplace($subpath);
298 298
             }
299 299
         }
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
     public function migrate()
303 303
     {
304 304
         $path = realpath(getcwd());
305
-        echo 'This will search and replace recursively in ' . $path . PHP_EOL;
306
-        echo 'You MUST backup your files first, or you risk losing data.' . PHP_EOL;
305
+        echo 'This will search and replace recursively in '.$path.PHP_EOL;
306
+        echo 'You MUST backup your files first, or you risk losing data.'.PHP_EOL;
307 307
         echo 'Are you sure ? (y/n)';
308 308
 
309 309
         $confirm = fread(STDIN, 1);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         // The string "PHPExcel" gets special treatment because of how common it might be.
327 327
         // This regex requires a word boundary around the string, and it can't be
328 328
         // preceded by $ or -> (goal is to filter out cases where a variable is named $PHPExcel or similar)
329
-        $converted = preg_replace('~(?<!\$|->)(\b|\\\\)PHPExcel\b~', '\\' . \PhpOffice\PhpSpreadsheet\Spreadsheet::class, $converted);
329
+        $converted = preg_replace('~(?<!\$|->)(\b|\\\\)PHPExcel\b~', '\\'.\PhpOffice\PhpSpreadsheet\Spreadsheet::class, $converted);
330 330
 
331 331
         return $converted;
332 332
     }
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/RichText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
         }
156 156
 
157 157
         return md5(
158
-            $hashElements .
158
+            $hashElements.
159 159
             __CLASS__
160 160
         );
161 161
     }
Please login to merge, or discard this patch.