Passed
Pull Request — main (#4945)
by
unknown
05:46
created
app/Report/HtmlRenderer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,8 @@
 block discarded – undo
198 198
         //-- footer
199 199
         echo '</div>';
200 200
         //echo '<script>document.getElementById("bodydiv").style.height="', $this->maxY, 'pt";</script>';
201
-        if ($this->Y < 200) { //heuristic guess!
201
+        if ($this->Y < 200) {
202
+//heuristic guess!
202 203
             echo '<div id="bottommargin" style="position: relative; top: auto; height: ', $this->bottom_margin - $this->footer_margin, 'pt;width:', $this->noMarginWidth, 'pt;"></div>';
203 204
             echo '<div id="footerdiv" style="position: relative; top: auto; width: ', $this->noMarginWidth, 'pt;height:auto;">';
204 205
         } else {
Please login to merge, or discard this patch.
app/Gedcom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@
 block discarded – undo
346 346
         '_MBON',
347 347
         '_NMR',
348 348
         '_SEPR',
349
-    '_SP_DEAT',  // only used internally, not exported to a gedcom file
349
+    '_SP_DEAT', // only used internally, not exported to a gedcom file
350 350
     ];
351 351
 
352 352
     public const CUSTOM_INDIVIDUAL_TAGS = [
Please login to merge, or discard this patch.
app/Report/ReportParserGenerate.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1138,7 +1138,7 @@
 block discarded – undo
1138 1138
                         $value = str_replace("\n", "<br>", $value);
1139 1139
                         //$value = strip_tags(Registry::markdownFactory()->autolink($value, $this->tree), ['br']);
1140 1140
                     }
1141
-                    $value = strtr($value, [MarkdownFactory::BREAK => ' ']);
1141
+                    $value = strtr($value, [MarkdownFactory::break => ' ']);
1142 1142
                 }
1143 1143
 
1144 1144
                 if (isset($attrs['lcfirst'])) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1022,7 +1022,7 @@  discard block
 block discarded – undo
1022 1022
                 $this->current_element->addText(I18N::translate('Private'));
1023 1023
             } elseif ($nameselect == 'latest') {
1024 1024
                 $tmp = $record->getAllNames();
1025
-                $name  = strip_tags($tmp[count($tmp) - 1]['full']);
1025
+                $name = strip_tags($tmp[count($tmp) - 1]['full']);
1026 1026
                 $this->current_element->addText(trim($name));
1027 1027
             } elseif ($nameselect == 'combined') {
1028 1028
                 $tmp = $record->getAllNames();
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
                 $value = $this->getGedcomValue($tag, $level, $this->gedrec);
1105 1105
                 switch (end($tags)) {
1106 1106
                     case 'DATE':
1107
-                        $tmp   = new Date($value);
1107
+                        $tmp = new Date($value);
1108 1108
                         $dfmt = "%j %F %Y";
1109 1109
                         if (!empty($attrs['truncate'])) {
1110 1110
                             if ($attrs['truncate'] === "d") {
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 
1145 1145
                 if (isset($attrs['lcfirst'])) {
1146 1146
                     $value = lcfirst($value);
1147
-                    $value = str_replace(["Å","Ä","Ö"], ["å","ä","ö"], $value);
1147
+                    $value = str_replace(["Å", "Ä", "Ö"], ["å", "ä", "ö"], $value);
1148 1148
                 }
1149 1149
 
1150 1150
                 if (!empty($attrs['truncate'])) {
@@ -1717,7 +1717,7 @@  discard block
 block discarded – undo
1717 1717
                 } elseif ($dumpvar != "") {
1718 1718
                     error_log("var: " . $dumpvar . " = " . $this->vars[$dumpvar]['id'] . "\n", 3, "my-errors.log");
1719 1719
                 } else {
1720
-                    if (array_key_exists('dval',$this->vars)) {
1720
+                    if (array_key_exists('dval', $this->vars)) {
1721 1721
                         $nnn = $this->vars['dval']['id'];
1722 1722
                     } else {
1723 1723
                         $nnn = 0;
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1028,7 +1028,8 @@  discard block
 block discarded – undo
1028 1028
                 $tmp = $record->getAllNames();
1029 1029
                 $name = $tmp[count($tmp) - 1]['full'];
1030 1030
                 $ix1 = strpos($name, '<span class="starredname">');
1031
-                if ($ix1 !== false) {   // '«' and '»' mark text for underlining
1031
+                if ($ix1 !== false) {
1032
+// '«' and '»' mark text for underlining
1032 1033
                     $name = substr_replace($name, '«', $ix1, 26);
1033 1034
                     $ix1 = strpos($name, '</span>', $ix1);
1034 1035
                     $name = substr_replace($name, '»', $ix1, 7);
@@ -1503,7 +1504,8 @@  discard block
 block discarded – undo
1503 1504
         // Sort facts in chronological order, if possible
1504 1505
         $m = count($this->repeats) - 1;
1505 1506
         $prevd = 0;
1506
-        for ($i = 0; $i <= $m; $i++) { // keep undated events after previous dated event
1507
+        for ($i = 0; $i <= $m; $i++) {
1508
+// keep undated events after previous dated event
1507 1509
             if ($jdarr[$i] === 0) {
1508 1510
                 $jdarr[$i] = $prevd;
1509 1511
             } else {
@@ -1757,7 +1759,8 @@  discard block
 block discarded – undo
1757 1759
         } elseif (preg_match('/^I18N::translateContext\(\'(.+)\', *\'(.+)\'\)$/', $value, $match)) {
1758 1760
             $value = I18N::translateContext($match[1], $match[2]);
1759 1761
         }
1760
-        if (isset($attrs['lcfirst'])) { // set 1st char to lower case
1762
+        if (isset($attrs['lcfirst'])) {
1763
+// set 1st char to lower case
1761 1764
             $value = lcfirst($value);
1762 1765
         }
1763 1766
 
Please login to merge, or discard this patch.
app/Report/ReportHtmlTextbox.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                         $lastelement   = $element;
70 70
                     }
71 71
                 } elseif ($element instanceof ReportHtmlImage) {
72
-                    $lastelement   = $element;
72
+                    $lastelement = $element;
73 73
                 } elseif ($element instanceof ReportHtmlFootnote) {
74 74
                     // Check if the Footnote has been set with it’s link number
75 75
                     $renderer->checkFootnote($element);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $this->top += 222000;
142 142
         }
143 143
         if ($this->top < -10000) { // <= -100000: both pdf and html; -100000 -- -90000: only html
144
-            $this->top += 90000;  //= ReportBaseElement::CURRENT_POSITION;
144
+            $this->top += 90000; //= ReportBaseElement::CURRENT_POSITION;
145 145
             if ($this->top < -9000) {
146 146
                 $this->top += 10000;
147 147
             }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,10 +137,12 @@
 block discarded – undo
137 137
         // If current position (top)
138 138
         $align_Y = false;
139 139
         $topstr = "";
140
-        if ($this->top < -110000) { // pos='abs'
140
+        if ($this->top < -110000) {
141
+// pos='abs'
141 142
             $this->top += 222000;
142 143
         }
143
-        if ($this->top < -10000) { // <= -100000: both pdf and html; -100000 -- -90000: only html
144
+        if ($this->top < -10000) {
145
+// <= -100000: both pdf and html; -100000 -- -90000: only html
144 146
             $this->top += 90000;  //= ReportBaseElement::CURRENT_POSITION;
145 147
             if ($this->top < -9000) {
146 148
                 $this->top += 10000;
Please login to merge, or discard this patch.
app/Report/ReportPdfTextBox.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@
 block discarded – undo
356 356
         $curr_P = $renderer->tcpdf->getPage();
357 357
         // New line and some clean up
358 358
         if (!$this->newline) {
359
-            $renderer->tcpdf->setXY($cX + $cW, $cY);   // $curr_Y);
359
+            $renderer->tcpdf->setXY($cX + $cW, $cY); // $curr_Y);
360 360
             $renderer->lastCellHeight = $cH;
361 361
         } else {
362 362
             // addMarginX() also updates X
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,10 +139,12 @@
 block discarded – undo
139 139
         // If current position (top)
140 140
         $align_Y = false;
141 141
         $curr_P = $renderer->tcpdf->getPage();
142
-        if ($this->top < -95000) { // 90000: only html; 100000: both pdf and html
142
+        if ($this->top < -95000) {
143
+// 90000: only html; 100000: both pdf and html
143 144
             $align_Y = true;
144 145
         }
145
-        if ($this->top < -200000) {   // pos="abs"
146
+        if ($this->top < -200000) {
147
+// pos="abs"
146 148
             $this->top += 222000;
147 149
         } else {
148 150
             $this->top = ReportBaseElement::CURRENT_POSITION;
Please login to merge, or discard this patch.