diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-10-29 16:51:36 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-10-29 16:51:36 +0100 |
| commit | 4fedbbe79c9187aacded3e24568fdd4ffb86138e (patch) | |
| tree | 2a1844ba9613427585b64c6b815c9b9a1febbe5b /app/Report | |
| parent | 728c8c2714cc197d45bad7363eb52e0bff3297bb (diff) | |
| download | webtrees-4fedbbe79c9187aacded3e24568fdd4ffb86138e.tar.gz webtrees-4fedbbe79c9187aacded3e24568fdd4ffb86138e.tar.bz2 webtrees-4fedbbe79c9187aacded3e24568fdd4ffb86138e.zip | |
CodeStyle - whitespace
Diffstat (limited to 'app/Report')
| -rw-r--r-- | app/Report/ReportBaseElement.php | 14 | ||||
| -rw-r--r-- | app/Report/ReportParserGenerate.php | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/app/Report/ReportBaseElement.php b/app/Report/ReportBaseElement.php index 820fd99e07..1f1a66ebae 100644 --- a/app/Report/ReportBaseElement.php +++ b/app/Report/ReportBaseElement.php @@ -78,16 +78,10 @@ class ReportBaseElement */ public function addText(string $t): void { - $t = trim($t, "\r\n\t"); - $t = str_replace([ - '<br>', - ' ', - ], [ - "\n", - ' ', - ], $t); - $t = strip_tags($t); - $this->text .= $t; + $t = trim($t, "\r\n\t"); + $t = strtr($t, ['<br>' => "\n", ' ' => ' ']); + + $this->text .= strip_tags($t); } /** diff --git a/app/Report/ReportParserGenerate.php b/app/Report/ReportParserGenerate.php index 6c195462bf..7fed3c9c7d 100644 --- a/app/Report/ReportParserGenerate.php +++ b/app/Report/ReportParserGenerate.php @@ -840,7 +840,7 @@ class ReportParserGenerate extends ReportParserBase // Until this can be re-designed, we need this assertion to help static analysis tools. assert($this->current_element instanceof ReportBaseElement, new LogicException()); - $this->wt_report = array_pop($this->wt_report_stack); + $this->wt_report = array_pop($this->wt_report_stack); $this->wt_report->addElement($this->current_element); } |
