Passed
Pull Request — main (#5055)
by
unknown
07:23
created
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.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1028,10 +1028,12 @@  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
-                    if ($ix1 !== false) {   // '«' and '»' mark text for underlining
1035
+                    if ($ix1 !== false) {
1036
+// '«' and '»' mark text for underlining
1035 1037
                         $name = substr_replace($name, '»', $ix1, 7);
1036 1038
                     }
1037 1039
                 }
@@ -1508,7 +1510,8 @@  discard block
 block discarded – undo
1508 1510
         // Sort facts in chronological order, if possible
1509 1511
         $m = count($this->repeats) - 1;
1510 1512
         $prevd = 0;
1511
-        for ($i = 0; $i <= $m; $i++) { // keep undated events after previous dated event
1513
+        for ($i = 0; $i <= $m; $i++) {
1514
+// keep undated events after previous dated event
1512 1515
             if ($jdarr[$i] === 0) {
1513 1516
                 $jdarr[$i] = $prevd;
1514 1517
             } else {
@@ -1762,7 +1765,8 @@  discard block
 block discarded – undo
1762 1765
         } elseif (preg_match('/^I18N::translateContext\(\'(.+)\', *\'(.+)\'\)$/', $value, $match)) {
1763 1766
             $value = I18N::translateContext($match[1], $match[2]);
1764 1767
         }
1765
-        if (isset($attrs['lcfirst'])) { // set 1st char to lower case
1768
+        if (isset($attrs['lcfirst'])) {
1769
+// set 1st char to lower case
1766 1770
             $value = lcfirst($value);
1767 1771
         }
1768 1772
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
             }
865 865
         }
866 866
 
867
-        error_log("\nRPG:867 [abs_position,top_position,top]=".var_export([$abs_position,$top_position,$top],true)."\n",3,"rpg.log");
867
+        error_log("\nRPG:867 [abs_position,top_position,top]=" . var_export([$abs_position, $top_position, $top], true) . "\n", 3, "rpg.log");
868 868
         // boolean After this box is finished rendering, should the next section of text start immediately after the this box or should it start on a new line under this box. 0 = no new line, 1 = force new line. Default is 0
869 869
 
870 870
         $newline = false;
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
                 $this->current_element->addText(I18N::translate('Private'));
1040 1040
             } elseif ($nameselect == 'latest') {
1041 1041
                 $tmp = $record->getAllNames();
1042
-                $name  = strip_tags($tmp[count($tmp) - 1]['full']);
1042
+                $name = strip_tags($tmp[count($tmp) - 1]['full']);
1043 1043
                 $this->current_element->addText(trim($name));
1044 1044
             } elseif ($nameselect == 'combined') {
1045 1045
                 $tmp = $record->getAllNames();
@@ -1123,7 +1123,7 @@  discard block
 block discarded – undo
1123 1123
                 $value = $this->getGedcomValue($tag, $level, $this->gedrec);
1124 1124
                 switch (end($tags)) {
1125 1125
                     case 'DATE':
1126
-                        $tmp   = new Date($value);
1126
+                        $tmp = new Date($value);
1127 1127
                         $dfmt = "%j %F %Y";
1128 1128
                         if (!empty($attrs['truncate'])) {
1129 1129
                             if ($attrs['truncate'] === "d") {
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 
1164 1164
                 if (isset($attrs['lcfirst'])) {
1165 1165
                     $value = lcfirst($value);
1166
-                    $value = str_replace(["Å","Ä","Ö"], ["å","ä","ö"], $value);
1166
+                    $value = str_replace(["Å", "Ä", "Ö"], ["å", "ä", "ö"], $value);
1167 1167
                 }
1168 1168
 
1169 1169
                 if (!empty($attrs['truncate'])) {
Please login to merge, or discard this patch.
app/Report/ReportHtmlImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
                 if ($this->width <= 30) {
69 69
                     $maxh = "max-height:40pt;";
70 70
                 }
71
-                echo '<img src="', $this->file, '" style="position:absolute;', $renderer->alignRTL, ':', $this->x, 'pt;top:', $this->y, 'pt;width:', $this->width, 'pt;',$maxh, ' alt="">\n';
71
+                echo '<img src="', $this->file, '" style="position:absolute;', $renderer->alignRTL, ':', $this->x, 'pt;top:', $this->y, 'pt;width:', $this->width, 'pt;', $maxh, ' alt="">\n';
72 72
         }
73 73
 
74 74
         $lastpicpage   = $renderer->pageNo();
Please login to merge, or discard this patch.
app/Report/ReportHtmlText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     {
100 100
         $ct = substr_count($this->text, "\n");
101 101
         if (substr($this->text, -1) == "\n") {
102
-            $ct -=1;
102
+            $ct -= 1;
103 103
         }
104 104
         if ($ct > 0) {
105 105
             $ct += 1;
Please login to merge, or discard this patch.
app/Report/ReportPdfTextBox.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -130,16 +130,16 @@  discard block
 block discarded – undo
130 130
         }
131 131
 
132 132
         $cE = count($this->elements);
133
-        if ($cE>0)
134
-            error_log("\npdfTB start: [cE,element[1]]=".
135
-                var_export([$cE,$this->elements[0]],true)."\n",3,"pdf_tb.log");
133
+        if ($cE > 0)
134
+            error_log("\npdfTB start: [cE,element[1]]=" .
135
+                var_export([$cE, $this->elements[0]], true) . "\n", 3, "pdf_tb.log");
136 136
 
137 137
         // If current position (top)
138 138
         $align_Y = false;
139 139
         $curr_P = $renderer->tcpdf->getPage();
140 140
         //$first_Y = $renderer->tcpdf->GetY();
141
-        error_log("\npdfTB1: [top,curr_P,abs_position,top_position,GetY()]=".
142
-            var_export([$this->top,$curr_P,$this->abs_position,$this->top_position,$renderer->tcpdf->GetY()],true)."\n",3,"pdf_tb.log");
141
+        error_log("\npdfTB1: [top,curr_P,abs_position,top_position,GetY()]=" .
142
+            var_export([$this->top, $curr_P, $this->abs_position, $this->top_position, $renderer->tcpdf->GetY()], true) . "\n", 3, "pdf_tb.log");
143 143
         if ($this->abs_position) {
144 144
             $this->top_position = 0;
145 145
             $align_Y = true;
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
             $cY = $renderer->tcpdf->GetY();
152 152
         } else {
153 153
             $align_Y = true;
154
-            $this->top = $renderer->tcpdf->GetY();   // ReportBaseElement::CURRENT_POSITION;
154
+            $this->top = $renderer->tcpdf->GetY(); // ReportBaseElement::CURRENT_POSITION;
155 155
             if ($this->top_position != 0) {
156 156
                 $this->top += $this->top_position;
157 157
             }
158 158
             $cY = $renderer->tcpdf->GetY();
159 159
         }
160 160
         $start_Y = $renderer->tcpdf->GetY();
161
-        error_log("\npdfTB2: [top,curr_P,top_position,start_Y]=".
162
-            var_export([$this->top,$curr_P,$this->top_position,$start_Y],true)."\n",3,"pdf_tb.log");
161
+        error_log("\npdfTB2: [top,curr_P,top_position,start_Y]=" .
162
+            var_export([$this->top, $curr_P, $this->top_position, $start_Y], true) . "\n", 3, "pdf_tb.log");
163 163
 
164 164
         // Check the width if set to page wide OR set by xml to larger then page width (margin)
165 165
         if ($this->width === 0.0 || $this->width > $renderer->getRemainingWidthPDF()) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $curr_P = $renderer->tcpdf->getPage();
359 359
         // New line and some clean up
360 360
         if (!$this->newline) {
361
-            $renderer->tcpdf->setXY($cX + $cW, $cY);   // $curr_Y);
361
+            $renderer->tcpdf->setXY($cX + $cW, $cY); // $curr_Y);
362 362
             $renderer->lastCellHeight = $cH;
363 363
         } else {
364 364
             // addMarginX() also updates X
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -130,9 +130,10 @@
 block discarded – undo
130 130
         }
131 131
 
132 132
         $cE = count($this->elements);
133
-        if ($cE>0)
134
-            error_log("\npdfTB start: [cE,element[1]]=".
133
+        if ($cE>0) {
134
+                    error_log("\npdfTB start: [cE,element[1]]=".
135 135
                 var_export([$cE,$this->elements[0]],true)."\n",3,"pdf_tb.log");
136
+        }
136 137
 
137 138
         // If current position (top)
138 139
         $align_Y = false;
Please login to merge, or discard this patch.
app/Report/ReportHtmlTextbox.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
         }
311 311
         error_log("\nhtml end1: [top,top_position,cYT,getY(),first_Y,newline]=".
312 312
             var_export([$this->top,$this->top_position,$cYT,$renderer->getY(),$first_Y,$this->newline],true)."\n",3,"html_tb.log");
313
-         // New line and some clean up
313
+            // New line and some clean up
314 314
         if (!$this->newline) {
315 315
             $renderer->setXy($cX + $this->width, $this->top);
316 316
             $renderer->lastCellHeight = $cH;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                         $lastelement   = $element;
69 69
                     }
70 70
                 } elseif ($element instanceof ReportHtmlImage) {
71
-                    $lastelement   = $element;
71
+                    $lastelement = $element;
72 72
                 } elseif ($element instanceof ReportHtmlFootnote) {
73 73
                     // Check if the Footnote has been set with it’s link number
74 74
                     $renderer->checkFootnote($element);
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
         $this->elements = $newelements;
122 122
         unset($footnote_element, $lastelement, $newelements);
123 123
 
124
-        if ($cE>0)
125
-            error_log("\nhtmlTB start: [cE,element[1]]=".
126
-                var_export([$cE,$this->elements[0]],true)."\n",3,"html_tb.log");
124
+        if ($cE > 0)
125
+            error_log("\nhtmlTB start: [cE,element[1]]=" .
126
+                var_export([$cE, $this->elements[0]], true) . "\n", 3, "html_tb.log");
127 127
 
128 128
 
129 129
         $cP = 0; // Class Padding
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
         $renderer->setXy($cXT, $cYT);
306 306
         // This will be mostly used to trick the multiple images last height
307 307
         if ($this->reseth) {
308
-            $this->top = $first_Y;  //- $cH;
308
+            $this->top = $first_Y; //- $cH;
309 309
             $cH = 0;
310 310
         }
311
-        error_log("\nhtml end1: [top,top_position,cYT,getY(),first_Y,newline]=".
312
-            var_export([$this->top,$this->top_position,$cYT,$renderer->getY(),$first_Y,$this->newline],true)."\n",3,"html_tb.log");
311
+        error_log("\nhtml end1: [top,top_position,cYT,getY(),first_Y,newline]=" .
312
+            var_export([$this->top, $this->top_position, $cYT, $renderer->getY(), $first_Y, $this->newline], true) . "\n", 3, "html_tb.log");
313 313
          // New line and some clean up
314 314
         if (!$this->newline) {
315 315
             $renderer->setXy($cX + $this->width, $this->top);
@@ -319,8 +319,8 @@  discard block
 block discarded – undo
319 319
             $renderer->setXy(0, $first_Y + $cH + $cP * 2);
320 320
             $renderer->lastCellHeight = 0;
321 321
         }
322
-        error_log("html end2: [top,reseth,cYT,cY,first_Y,newline]=".
323
-            var_export([$this->top,$this->reseth,$cYT,$renderer->getY(),$first_Y,$this->newline],true)."\n",3,"html_tb.log");
322
+        error_log("html end2: [top,reseth,cYT,cY,first_Y,newline]=" .
323
+            var_export([$this->top, $this->reseth, $cYT, $renderer->getY(), $first_Y, $this->newline], true) . "\n", 3, "html_tb.log");
324 324
         // This will make images in textboxes to ignore images in previous textboxes
325 325
         // Without this trick the $lastpicbottom in the previos textbox will be used in ReportHtmlImage
326 326
         $renderer->pageN++;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,9 +121,10 @@
 block discarded – undo
121 121
         $this->elements = $newelements;
122 122
         unset($footnote_element, $lastelement, $newelements);
123 123
 
124
-        if ($cE>0)
125
-            error_log("\nhtmlTB start: [cE,element[1]]=".
124
+        if ($cE>0) {
125
+                    error_log("\nhtmlTB start: [cE,element[1]]=".
126 126
                 var_export([$cE,$this->elements[0]],true)."\n",3,"html_tb.log");
127
+        }
127 128
 
128 129
 
129 130
         $cP = 0; // Class Padding
Please login to merge, or discard this patch.
app/Report/ReportBaseTextbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
         $this->reseth    = $reseth;
129 129
         $this->abs_position = $abs_position;
130 130
         $this->top_position = $top_position;
131
-        error_log("\ncreateTB base(top,w,h,nl,reseth): ".var_export([$top,$width,$height,$newline,$reseth],true)."\n\n",3,"pdf.log");
131
+        error_log("\ncreateTB base(top,w,h,nl,reseth): " . var_export([$top, $width, $height, $newline, $reseth], true) . "\n\n", 3, "pdf.log");
132 132
     }
133 133
 
134 134
     /**
Please login to merge, or discard this patch.