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/ReportBaseText.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/ReportBaseText.php')
| -rw-r--r-- | app/Report/ReportBaseText.php | 130 |
1 files changed, 67 insertions, 63 deletions
diff --git a/app/Report/ReportBaseText.php b/app/Report/ReportBaseText.php index a9f268fc70..3254440879 100644 --- a/app/Report/ReportBaseText.php +++ b/app/Report/ReportBaseText.php @@ -18,72 +18,76 @@ namespace Fisharebest\Webtrees\Report; /** * Class ReportBaseText */ -class ReportBaseText extends ReportBaseElement { - /** - * Text color in HTML code - * - * @var string - */ - public $color; - /** - * Style name - * - * @var string - */ - public $styleName; - /** - * Remaining width of a cel - * - * @var int User unit (points) - */ - public $wrapWidthRemaining; - /** - * Original width of a cell - * - * @var int User unit (points) - */ - public $wrapWidthCell; +class ReportBaseText extends ReportBaseElement +{ + /** + * Text color in HTML code + * + * @var string + */ + public $color; + /** + * Style name + * + * @var string + */ + public $styleName; + /** + * Remaining width of a cel + * + * @var int User unit (points) + */ + public $wrapWidthRemaining; + /** + * Original width of a cell + * + * @var int User unit (points) + */ + public $wrapWidthCell; - /** - * Create a Text class - Base - * - * @param string $style The name of the text style - * @param string $color HTML color code - */ - public function __construct($style, $color) { - $this->text = ''; - $this->color = $color; - $this->wrapWidthRemaining = 0; - $this->styleName = $style; + /** + * Create a Text class - Base + * + * @param string $style The name of the text style + * @param string $color HTML color code + */ + public function __construct($style, $color) + { + $this->text = ''; + $this->color = $color; + $this->wrapWidthRemaining = 0; + $this->styleName = $style; - return 0; - } + return 0; + } - /** - * Set the width for word-wrapping. - * - * @param $wrapwidth - * @param $cellwidth - * - * @return mixed - */ - public function setWrapWidth($wrapwidth, $cellwidth) { - $this->wrapWidthCell = $cellwidth; - if (strpos($this->text, "\n") !== false) { - $this->wrapWidthRemaining = $cellwidth; - } else { - $this->wrapWidthRemaining = $wrapwidth; - } + /** + * Set the width for word-wrapping. + * + * @param $wrapwidth + * @param $cellwidth + * + * @return mixed + */ + public function setWrapWidth($wrapwidth, $cellwidth) + { + $this->wrapWidthCell = $cellwidth; + if (strpos($this->text, "\n") !== false) { + $this->wrapWidthRemaining = $cellwidth; + } else { + $this->wrapWidthRemaining = $wrapwidth; + } - return $this->wrapWidthRemaining; - } + return $this->wrapWidthRemaining; + } - /** - * Get the style name. - * - * @return string - */ - public function getStyleName() { - return $this->styleName; - } + /** + * Get the style name. + * + * @return string + */ + public function getStyleName() + { + return $this->styleName; + } } |
