summaryrefslogtreecommitdiff
path: root/app/Report/ReportBaseElement.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-07-16 08:20:33 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-07-16 08:20:33 +0100
commitc1010eda29c0909ed4d5d463f32d32bfefdd4dfe (patch)
treefbb656ebc014aa1295ac8e6176f41e89f94b91e7 /app/Report/ReportBaseElement.php
parent782f08d9bd2bfa06635da947ee34f8e1afd65088 (diff)
downloadwebtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.gz
webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.bz2
webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.zip
Use PSR2 code style
Diffstat (limited to 'app/Report/ReportBaseElement.php')
-rw-r--r--app/Report/ReportBaseElement.php194
1 files changed, 105 insertions, 89 deletions
diff --git a/app/Report/ReportBaseElement.php b/app/Report/ReportBaseElement.php
index ffede002a3..cb5e5f2f07 100644
--- a/app/Report/ReportBaseElement.php
+++ b/app/Report/ReportBaseElement.php
@@ -18,104 +18,120 @@ namespace Fisharebest\Webtrees\Report;
/**
* Class ReportBaseElement
*/
-class ReportBaseElement {
- /** @var string Text*/
- public $text = '';
+class ReportBaseElement
+{
+ /** @var string Text */
+ public $text = '';
- /**
- * Element renderer
- *
- * @param ReportHtml|ReportTcpdf $renderer
- */
- public function render($renderer) {
- //-- to be implemented in inherited classes
- }
+ /**
+ * Element renderer
+ *
+ * @param ReportHtml|ReportTcpdf $renderer
+ */
+ public function render($renderer)
+ {
+ //-- to be implemented in inherited classes
+ }
- /**
- * Get the height.
- *
- * @param ReportHtml|ReportTcpdf $renderer
- *
- * @return float
- */
- public function getHeight($renderer) {
- return 0.0;
- }
+ /**
+ * Get the height.
+ *
+ * @param ReportHtml|ReportTcpdf $renderer
+ *
+ * @return float
+ */
+ public function getHeight($renderer)
+ {
+ return 0.0;
+ }
- /**
- * Get the width.
- *
- * @param ReportHtml|ReportTcpdf $renderer
- *
- * @return float
- */
- public function getWidth($renderer) {
- return 0.0;
- }
+ /**
+ * Get the width.
+ *
+ * @param ReportHtml|ReportTcpdf $renderer
+ *
+ * @return float
+ */
+ public function getWidth($renderer)
+ {
+ return 0.0;
+ }
- /**
- * Add text.
- *
- * @param string $t
- *
- * @return int
- */
- public function addText($t) {
- $t = trim($t, "\r\n\t");
- $t = str_replace(['<br>', '&nbsp;'], ["\n", ' '], $t);
- $t = strip_tags($t);
- $t = htmlspecialchars_decode($t);
- $this->text .= $t;
+ /**
+ * Add text.
+ *
+ * @param string $t
+ *
+ * @return int
+ */
+ public function addText($t)
+ {
+ $t = trim($t, "\r\n\t");
+ $t = str_replace([
+ '<br>',
+ '&nbsp;',
+ ], [
+ "\n",
+ ' ',
+ ], $t);
+ $t = strip_tags($t);
+ $t = htmlspecialchars_decode($t);
+ $this->text .= $t;
- return 0;
- }
+ return 0;
+ }
- /**
- * Add an end-of-line.
- *
- * @return int
- */
- public function addNewline() {
- $this->text .= "\n";
+ /**
+ * Add an end-of-line.
+ *
+ * @return int
+ */
+ public function addNewline()
+ {
+ $this->text .= "\n";
- return 0;
- }
+ return 0;
+ }
- /**
- * Get the current text.
- *
- * @return string
- */
- public function getValue() {
- return $this->text;
- }
+ /**
+ * Get the current text.
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->text;
+ }
- /**
- * Set the width to wrap text.
- *
- * @param $wrapwidth
- * @param $cellwidth
- *
- * @return int
- */
- public function setWrapWidth($wrapwidth, $cellwidth) {
- return 0;
- }
+ /**
+ * Set the width to wrap text.
+ *
+ * @param $wrapwidth
+ * @param $cellwidth
+ *
+ * @return int
+ */
+ public function setWrapWidth($wrapwidth, $cellwidth)
+ {
+ return 0;
+ }
- /**
- * Render the footnotes.
- *
- * @param $renderer
- */
- public function renderFootnote($renderer) {
- }
+ /**
+ * Render the footnotes.
+ *
+ * @param $renderer
+ */
+ public function renderFootnote($renderer)
+ {
+ }
- /**
- * Set the text.
- *
- * @param $text
- */
- public function setText($text) {
- $this->text = $text;
- }
+ /**
+ * Set the text.
+ *
+ * @param $text
+ */
+ public function setText($text)
+ {
+ $this->text = $text;
+ }
}