summaryrefslogtreecommitdiff
path: root/app/Report/ReportBaseElement.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2018-10-09 16:57:52 +0100
committerGreg Roach <fisharebest@webtrees.net>2018-10-09 16:57:52 +0100
commitc21bdddc89b941099aac7bad64af11da73acab4e (patch)
tree96c9e03c6e2445fb719c34f679e87b812ad2c220 /app/Report/ReportBaseElement.php
parente24444eeefe1caed93aa11866313e0407b4ce028 (diff)
downloadwebtrees-c21bdddc89b941099aac7bad64af11da73acab4e.tar.gz
webtrees-c21bdddc89b941099aac7bad64af11da73acab4e.tar.bz2
webtrees-c21bdddc89b941099aac7bad64af11da73acab4e.zip
More type hints for reports
Diffstat (limited to 'app/Report/ReportBaseElement.php')
-rw-r--r--app/Report/ReportBaseElement.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/Report/ReportBaseElement.php b/app/Report/ReportBaseElement.php
index e55d263154..9d95af5372 100644
--- a/app/Report/ReportBaseElement.php
+++ b/app/Report/ReportBaseElement.php
@@ -22,6 +22,9 @@ namespace Fisharebest\Webtrees\Report;
*/
class ReportBaseElement
{
+ // Special value for X or Y position, to indicate the current position.
+ CONST CURRENT_POSITION = -1.0;
+
/** @var string Text */
public $text = '';
@@ -106,12 +109,12 @@ class ReportBaseElement
/**
* Set the width to wrap text.
*
- * @param $wrapwidth
- * @param $cellwidth
+ * @param float $wrapwidth
+ * @param float $cellwidth
*
* @return float
*/
- public function setWrapWidth($wrapwidth, $cellwidth): float
+ public function setWrapWidth(float $wrapwidth, float $cellwidth): float
{
return 0;
}
@@ -130,11 +133,11 @@ class ReportBaseElement
/**
* Set the text.
*
- * @param $text
+ * @param string $text
*
* @return void
*/
- public function setText($text)
+ public function setText(string $text)
{
$this->text = $text;
}