@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_NULL); |
| 73 | 73 | break; |
| 74 | 74 | case 'boolean': |
| 75 | - $this->pdo_statement->bindValue($key, (int)$bind_variable, PDO::PARAM_INT); |
|
| 75 | + $this->pdo_statement->bindValue($key, (int) $bind_variable, PDO::PARAM_INT); |
|
| 76 | 76 | break; |
| 77 | 77 | case 'integer': |
| 78 | 78 | $this->pdo_statement->bindValue($key, $bind_variable, PDO::PARAM_INT); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $_tmp_dir = $WT_DATA_DIR; |
| 64 | 64 | while (strpos($_mf_dir, $_tmp_dir) !== 0) { |
| 65 | 65 | $_media_dir .= '../'; |
| 66 | - $_tmp_dir = preg_replace('~[^/\\\\]+[/\\\\]$~', '', $_tmp_dir); |
|
| 66 | + $_tmp_dir = preg_replace('~[^/\\\\]+[/\\\\]$~', '', $_tmp_dir); |
|
| 67 | 67 | if ($_tmp_dir == '') { |
| 68 | 68 | // Shouldn't get here - but this script is not allowed to fail... |
| 69 | 69 | continue 2; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if ($this->wrapWidthRemaining > 0) { |
| 111 | 111 | // Check with line counter too! |
| 112 | 112 | // but floor the $wrapWidthRemaining first to keep it bugfree! |
| 113 | - $wrapWidthRemaining = (int)($this->wrapWidthRemaining); |
|
| 113 | + $wrapWidthRemaining = (int) ($this->wrapWidthRemaining); |
|
| 114 | 114 | if ($lw >= $wrapWidthRemaining || $lfct > 1) { |
| 115 | 115 | $newtext = ''; |
| 116 | 116 | $lines = explode("\n", $this->numText); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $newtext .= ' '; |
| 133 | 133 | } |
| 134 | 134 | } else { |
| 135 | - $lw = $pdf->GetStringWidth($word . ' '); |
|
| 135 | + $lw = $pdf->GetStringWidth($word . ' '); |
|
| 136 | 136 | $newtext .= "\n$word"; |
| 137 | 137 | if ($addspace != 0) { |
| 138 | 138 | $newtext .= ' '; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | if ($this->wrapWidthRemaining > 0) { |
| 126 | 126 | // Check with line counter too! |
| 127 | 127 | // but floor the $wrapWidthRemaining first to keep it bugfree! |
| 128 | - $wrapWidthRemaining = (int)($this->wrapWidthRemaining); |
|
| 128 | + $wrapWidthRemaining = (int) ($this->wrapWidthRemaining); |
|
| 129 | 129 | if ($lw >= $wrapWidthRemaining || $lfct > 1) { |
| 130 | 130 | $newtext = ''; |
| 131 | 131 | $lines = explode("\n", $this->text); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | $newtext .= ' '; |
| 148 | 148 | } |
| 149 | 149 | } else { |
| 150 | - $lw = $pdf->GetStringWidth($word . ' '); |
|
| 150 | + $lw = $pdf->GetStringWidth($word . ' '); |
|
| 151 | 151 | $newtext .= "\n$word"; |
| 152 | 152 | if ($addspace != 0) { |
| 153 | 153 | $newtext .= ' '; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $newtext .= ' '; |
| 142 | 142 | } |
| 143 | 143 | } else { |
| 144 | - $lw = $html->getStringWidth($word . ' '); |
|
| 144 | + $lw = $html->getStringWidth($word . ' '); |
|
| 145 | 145 | $newtext .= "\n$word"; |
| 146 | 146 | if ($addspace != 0) { |
| 147 | 147 | $newtext .= ' '; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | '<u>', |
| 47 | 47 | '</u>', |
| 48 | 48 | ], $temptext); |
| 49 | - $match = []; |
|
| 49 | + $match = []; |
|
| 50 | 50 | // Indicates if the cell background must be painted (1) or transparent (0) |
| 51 | 51 | if ($this->fill == 1) { |
| 52 | 52 | if (!empty($this->bgcolor)) { |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $lines = explode("\n", $temptext); |
| 63 | 63 | foreach ($lines as $line) { |
| 64 | 64 | echo '<div style="position:absolute;top:', $startY, 'pt;', $renderer->alignRTL, ':', $startX, 'pt;width:', $width, 'pt;">'; |
| 65 | - $line = $renderer->textWrap($line, $width); |
|
| 65 | + $line = $renderer->textWrap($line, $width); |
|
| 66 | 66 | $startY += $renderer->getTextCellHeight($line); |
| 67 | 67 | $renderer->setY($startY); |
| 68 | 68 | $renderer->write($line, $this->color); |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $newtext .= ' '; |
| 150 | 150 | } |
| 151 | 151 | } else { |
| 152 | - $lw = $html->getStringWidth($word . ' '); |
|
| 152 | + $lw = $html->getStringWidth($word . ' '); |
|
| 153 | 153 | $newtext .= "\n$word"; |
| 154 | 154 | if ($addspace != 0) { |
| 155 | 155 | $newtext .= ' '; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $this->pageh = $tmpw; |
| 149 | 149 | } |
| 150 | 150 | // Store the pagewidth without margins |
| 151 | - $this->noMarginWidth = (int)($this->pagew - $this->leftmargin - $this->rightmargin); |
|
| 151 | + $this->noMarginWidth = (int) ($this->pagew - $this->leftmargin - $this->rightmargin); |
|
| 152 | 152 | // If RTL |
| 153 | 153 | if ($this->rtl) { |
| 154 | 154 | $this->alignRTL = 'right'; |
@@ -740,14 +740,14 @@ discard block |
||
| 740 | 740 | public function textWrap($str, $width): string |
| 741 | 741 | { |
| 742 | 742 | // Calculate the line width |
| 743 | - $lw = (int)($width / ($this->getCurrentStyleHeight() / 2)); |
|
| 743 | + $lw = (int) ($width / ($this->getCurrentStyleHeight() / 2)); |
|
| 744 | 744 | // Wordwrap each line |
| 745 | 745 | $lines = explode("\n", $str); |
| 746 | 746 | // Line Feed counter |
| 747 | 747 | $lfct = count($lines); |
| 748 | 748 | $wraptext = ''; |
| 749 | 749 | foreach ($lines as $line) { |
| 750 | - $wtext = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true); |
|
| 750 | + $wtext = FunctionsRtl::utf8WordWrap($line, $lw, "\n", true); |
|
| 751 | 751 | $wraptext .= $wtext; |
| 752 | 752 | // Add a new line as long as it’s not the last line |
| 753 | 753 | if ($lfct > 1) { |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * webtrees: online genealogy |
| 5 | 5 | * Copyright (C) 2018 webtrees development team |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $attrs .= ' ' . $key . '="' . e($value) . '"'; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $class = trim('dropdown-item ' . $submenu->class); |
|
| 73 | + $class = trim('dropdown-item ' . $submenu->class); |
|
| 74 | 74 | $submenus .= '<a class="' . $class . '" href="' . e($submenu->link) . '"' . $attrs . '>' . $submenu->label . '</a>'; |
| 75 | 75 | } |
| 76 | 76 | |