diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-07-16 08:20:33 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-07-16 08:20:33 +0100 |
| commit | c1010eda29c0909ed4d5d463f32d32bfefdd4dfe (patch) | |
| tree | fbb656ebc014aa1295ac8e6176f41e89f94b91e7 /app/Report/ReportHtmlLine.php | |
| parent | 782f08d9bd2bfa06635da947ee34f8e1afd65088 (diff) | |
| download | webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.gz webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.bz2 webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.zip | |
Use PSR2 code style
Diffstat (limited to 'app/Report/ReportHtmlLine.php')
| -rw-r--r-- | app/Report/ReportHtmlLine.php | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/app/Report/ReportHtmlLine.php b/app/Report/ReportHtmlLine.php index f9b21ce43c..727f40f630 100644 --- a/app/Report/ReportHtmlLine.php +++ b/app/Report/ReportHtmlLine.php @@ -18,36 +18,38 @@ namespace Fisharebest\Webtrees\Report; /** * Class ReportHtmlLine */ -class ReportHtmlLine extends ReportBaseLine { - /** - * HTML line renderer - * - * @param ReportHtml $renderer - */ - public function render($renderer) { - if ($this->x1 == '.') { - $this->x1 = $renderer->getX(); - } - if ($this->y1 == '.') { - $this->y1 = $renderer->getY(); - } - if ($this->x2 == '.') { - $this->x2 = $renderer->getRemainingWidth(); - } - if ($this->y2 == '.') { - $this->y2 = $renderer->getY(); - } - // Vertical line - if ($this->x1 == $this->x2) { - echo '<div style="position:absolute;overflow:hidden;border-', $renderer->alignRTL, ':solid black 1pt;', $renderer->alignRTL, ':', $this->x1, 'pt;top:', $this->y1 + 1, 'pt;width:1pt;height:', $this->y2 - $this->y1, "pt;\"> </div>\n"; - } - // Horizontal line - if ($this->y1 == $this->y2) { - echo '<div style="position:absolute;overflow:hidden;border-top:solid black 1pt;', $renderer->alignRTL, ':', $this->x1, 'pt;top:', $this->y1 + 1, 'pt;width:', $this->x2 - $this->x1, "pt;height:1pt;\"> </div>\n"; - } - // Keep max Y updated - // One or the other will be higher... lasy mans way... - $renderer->addMaxY($this->y1); - $renderer->addMaxY($this->y2); - } +class ReportHtmlLine extends ReportBaseLine +{ + /** + * HTML line renderer + * + * @param ReportHtml $renderer + */ + public function render($renderer) + { + if ($this->x1 == '.') { + $this->x1 = $renderer->getX(); + } + if ($this->y1 == '.') { + $this->y1 = $renderer->getY(); + } + if ($this->x2 == '.') { + $this->x2 = $renderer->getRemainingWidth(); + } + if ($this->y2 == '.') { + $this->y2 = $renderer->getY(); + } + // Vertical line + if ($this->x1 == $this->x2) { + echo '<div style="position:absolute;overflow:hidden;border-', $renderer->alignRTL, ':solid black 1pt;', $renderer->alignRTL, ':', $this->x1, 'pt;top:', $this->y1 + 1, 'pt;width:1pt;height:', $this->y2 - $this->y1, "pt;\"> </div>\n"; + } + // Horizontal line + if ($this->y1 == $this->y2) { + echo '<div style="position:absolute;overflow:hidden;border-top:solid black 1pt;', $renderer->alignRTL, ':', $this->x1, 'pt;top:', $this->y1 + 1, 'pt;width:', $this->x2 - $this->x1, "pt;height:1pt;\"> </div>\n"; + } + // Keep max Y updated + // One or the other will be higher... lasy mans way... + $renderer->addMaxY($this->y1); + $renderer->addMaxY($this->y2); + } } |
