diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-09-09 22:15:46 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-09-14 16:02:08 +0100 |
| commit | 77bab46164e79833b0e2cc2442328cb5f47dd5e6 (patch) | |
| tree | ce2aa539e03a7904dfb81555a4448f711b829b00 /app/Report/ReportHtmlCell.php | |
| parent | a3148b03cff68ac7a179d4636354b8e1c00044ca (diff) | |
| download | webtrees-77bab46164e79833b0e2cc2442328cb5f47dd5e6.tar.gz webtrees-77bab46164e79833b0e2cc2442328cb5f47dd5e6.tar.bz2 webtrees-77bab46164e79833b0e2cc2442328cb5f47dd5e6.zip | |
Reports PHPdoc
Diffstat (limited to 'app/Report/ReportHtmlCell.php')
| -rw-r--r-- | app/Report/ReportHtmlCell.php | 56 |
1 files changed, 13 insertions, 43 deletions
diff --git a/app/Report/ReportHtmlCell.php b/app/Report/ReportHtmlCell.php index 12b5834c89..48e89f3cd4 100644 --- a/app/Report/ReportHtmlCell.php +++ b/app/Report/ReportHtmlCell.php @@ -35,7 +35,7 @@ class ReportHtmlCell extends ReportBaseCell * * @return void */ - public function render($renderer) + public function render($renderer): void { if (str_contains($this->text, '{{:ptp:}}')) { return; @@ -88,65 +88,35 @@ class ReportHtmlCell extends ReportBaseCell $bpixY = 0; if (!empty($this->border)) { // Border all around - if ($this->border == 1) { - echo ' border:solid '; - if (!empty($this->bocolor)) { - echo $this->bocolor; - } else { - echo 'black'; - } - echo ' 1pt;'; + if ($this->border === '1') { + echo ' border:solid ', $this->bocolor ?: 'black', ' 1pt;'; $bpixX = 1; $bpixY = 1; } else { - if (stripos($this->border, 'T') !== false) { - echo ' border-top:solid '; - if (!empty($this->bocolor)) { - echo $this->bocolor; - } else { - echo 'black'; - } - echo ' 1pt;'; + if (str_contains($this->border, 'T')) { + echo ' border-top:solid ', $this->bocolor ?: 'black', ' 1pt;'; $bpixY = 1; } - if (stripos($this->border, 'B') !== false) { - echo ' border-bottom:solid '; - if (!empty($this->bocolor)) { - echo $this->bocolor; - } else { - echo 'black'; - } - echo ' 1pt;'; + if (str_contains($this->border, 'B')) { + echo ' border-bottom:solid ', $this->bocolor ?: 'black', ' 1pt;'; $bpixY = 1; } - if (stripos($this->border, 'R') !== false) { - echo ' border-right:solid '; - if (!empty($this->bocolor)) { - echo $this->bocolor; - } else { - echo 'black'; - } - echo ' 1pt;'; + if (str_contains($this->border, 'R')) { + echo ' border-right:solid ', $this->bocolor ?: 'black', ' 1pt;'; $bpixX = 1; } - if (stripos($this->border, 'L') !== false) { - echo ' border-left:solid '; - if (!empty($this->bocolor)) { - echo $this->bocolor; - } else { - echo 'black'; - } - echo ' 1pt;'; + if (str_contains($this->border, 'L')) { + echo ' border-left:solid ', $this->bocolor ?: 'black', ' 1pt;'; $bpixX = 1; } } } // Check the width if set to page wide OR set by xml to larger then page wide - if ($this->width == 0 || $this->width > $renderer->getRemainingWidth()) { + if ($this->width === 0.0 || $this->width > $renderer->getRemainingWidth()) { $this->width = $renderer->getRemainingWidth(); } // We have to calculate a different width for the padding, counting on both side - $cW = $this->width - $cP * 2; + $cW = $this->width - $cP * 2.0; // If there is any text if (!empty($temptext)) { |
