Completed
Pull Request — master (#1464)
by Rico
07:53
created
edit_interface.php 2 patches
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@
 block discarded – undo
23 23
 use Fisharebest\Webtrees\Functions\FunctionsEdit;
24 24
 use Fisharebest\Webtrees\Functions\FunctionsImport;
25 25
 use Fisharebest\Webtrees\Functions\FunctionsPrint;
26
-use Fisharebest\Webtrees\GedcomCode\GedcomCodeName;use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
26
+use Fisharebest\Webtrees\GedcomCode\GedcomCodeName;
27
+use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
27 28
 use Fisharebest\Webtrees\Module\CensusAssistantModule;
28 29
 
29 30
 require 'includes/session.php';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 use Fisharebest\Webtrees\Functions\FunctionsEdit;
24 24
 use Fisharebest\Webtrees\Functions\FunctionsImport;
25 25
 use Fisharebest\Webtrees\Functions\FunctionsPrint;
26
-use Fisharebest\Webtrees\GedcomCode\GedcomCodeName;use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
26
+use Fisharebest\Webtrees\GedcomCode\GedcomCodeName; use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi;
27 27
 use Fisharebest\Webtrees\Module\CensusAssistantModule;
28 28
 
29 29
 require 'includes/session.php';
@@ -2968,7 +2968,7 @@  discard block
 block discarded – undo
2968 2968
 	// First - standard name fields
2969 2969
 	foreach ($name_fields as $tag => $value) {
2970 2970
 		if (substr_compare($tag, '_', 0, 1) !== 0) {
2971
-			echo FunctionsEdit::addSimpleTag('0 ' . $tag . ' ' . $value, '', '',  null, $person);
2971
+			echo FunctionsEdit::addSimpleTag('0 ' . $tag . ' ' . $value, '', '', null, $person);
2972 2972
 		}
2973 2973
 	}
2974 2974
 
Please login to merge, or discard this patch.
app/Statement.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
 	 *
107 107
 	 * @param int $fetch_style
108 108
 	 *
109
-	 * @return stdClass|array|false
109
+	 * @return Tree
110 110
 	 */
111 111
 	public function fetch($fetch_style = PDO::FETCH_OBJ) {
112 112
 		if (!$this->executed) {
Please login to merge, or discard this patch.
app/View.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	/**
33 33
 	 * Createa view from a template name and optional data.
34 34
 	 *
35
-	 * @param       $name
35
+	 * @param       string $name
36 36
 	 * @param array $data
37 37
 	 */
38 38
 	public function __construct($name, $data = []) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 	 * @return string
63 63
 	 */
64 64
 	public static function getFilenameForView($view_name) {
65
-		$view_file  = $view_name . '.php';
65
+		$view_file = $view_name . '.php';
66 66
 		//$theme_view = WT_THEMES_DIR . Theme::theme()->themeId() . '/resources/views/' . $view_file;
67 67
 
68 68
 		//if (file_exists($theme_view)) {
Please login to merge, or discard this patch.
app/Controller/SearchController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 
18 18
 use Fisharebest\Webtrees\Auth;
19 19
 use Fisharebest\Webtrees\Bootstrap4;
20
-use Fisharebest\Webtrees\Config;
21 20
 use Fisharebest\Webtrees\Family;
22 21
 use Fisharebest\Webtrees\Filter;
23 22
 use Fisharebest\Webtrees\FlashMessages;
Please login to merge, or discard this patch.
search_advanced.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,7 +146,8 @@  discard block
 block discarded – undo
146 146
 					value="<?= Html::escape($controller->getValue($i)) ?>">
147 147
 						<?php if (preg_match('/^NAME:/', $currentFieldSearch) > 0): ?>
148 148
 							<select class="form-control form-control-sm col-3" name="fields[<?= $i ?>]">
149
-								<option value="<?= $currentField ?>:EXACT" <?php if (preg_match('/:EXACT$/', $currentFieldSearch) > 0) echo 'selected' ?>>
149
+								<option value="<?= $currentField ?>:EXACT" <?php if (preg_match('/:EXACT$/', $currentFieldSearch) > 0) {
150
+	echo 'selected' ?>>
150 151
 									<?= I18N::translate('Exact') ?>
151 152
 								</option>
152 153
 								<option value="<?= $currentField ?>:BEGINS" <?php if (preg_match('/:BEGINS$/', $currentFieldSearch) > 0) echo 'selected' ?>>
@@ -161,13 +162,15 @@  discard block
 block discarded – undo
161 162
 						<?php else: ?>
162 163
 							<input type="hidden" name="fields[<?= $i ?>]" value="<?= $controller->getField($i) ?>">
163 164
 						<?php endif;
165
+}
164 166
 						if (preg_match('/:DATE$/', $currentFieldSearch) > 0) {
165 167
 							?>
166 168
 							<select class="form-control form-control-sm col-3" name="plusminus[<?= $i ?>]">
167 169
 								<option value="">
168 170
 									<?= I18N::translate('Exact date') ?>
169 171
 								</option>
170
-								<option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) echo 'selected' ?>>
172
+								<option value="2" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 2) {
173
+	echo 'selected' ?>>
171 174
 									<?= I18N::plural('±%s year', '±%s years', 2, I18N::number(2)) ?>
172 175
 								</option>
173 176
 								<option value="5" <?php if (!empty($controller->plusminus[$i]) && $controller->plusminus[$i] == 5) echo 'selected' ?>>
@@ -183,6 +186,7 @@  discard block
 block discarded – undo
183 186
 					//-- relative fields
184 187
 					if ($i == 0 && $fct > 4) {
185 188
 						$j = $fct;
189
+}
186 190
 						// Get the current options for Father’s and Mother’s name searches
187 191
 						$fatherGivnOption = 'SDX';
188 192
 						$fatherSurnOption = 'SDX';
Please login to merge, or discard this patch.
app/Module/ResearchTaskModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 			'jd'      => $end_jd,
78 78
 		])->fetchOneColumn();
79 79
 
80
-		$records = array_map(function($xref) use ($WT_TREE) {
80
+		$records = array_map(function ($xref) use ($WT_TREE) {
81 81
 			return GedcomRecord::getInstance($xref, $WT_TREE);
82 82
 		}, $xrefs);
83 83
 
Please login to merge, or discard this patch.
resources/views/blocks/sign-in.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php use Fisharebest\Webtrees\Html; ?>
1
+<?php  ?>
2 2
 <?php use Fisharebest\Webtrees\I18N; ?>
3 3
 
4 4
 <form name="login-form" method="POST" action="<?= WT_LOGIN_URL ?>">
Please login to merge, or discard this patch.
app/Functions/FunctionsPrintFacts.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,8 @@  discard block
 block discarded – undo
191 191
 			<div class="editfacts">
192 192
 				<?php if ($fact->getTag() === 'FILE' && $fact->getParent() instanceof Media): ?>
193 193
 					<?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => 'edit_interface.php?action=media-edit&xref=' . $parent->getXref() . '&fact_id=' . $fact->getFactId() . '&ged=' . $parent->getTree()->getNameHtml()]) ?>
194
-				<?php else: ?>
194
+				<?php else {
195
+	: ?>
195 196
 					<?= FontAwesome::linkIcon('edit', I18N::translate('Edit'), ['class' => 'btn btn-link', 'href' => 'edit_interface.php?action=edit&xref=' . $parent->getXref() . '&fact_id=' . $fact->getFactId() . '&ged=' . $parent->getTree()->getNameHtml()]) ?>
196 197
 					<?= FontAwesome::linkIcon('copy', I18N::translate('Copy'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return copy_fact("' . $parent->getXref() . '", "' . $fact->getFactId() . '");']) ?>
197 198
 					<?= FontAwesome::linkIcon('delete', I18N::translate('Delete'), ['class' => 'btn btn-link', 'href' => '#', 'onclick' => 'return delete_fact("' . I18N::translate('Are you sure you want to delete this fact?') . '", "' . $parent->getXref() . '", "' . $fact->getFactId() . '");']) ?>
@@ -200,6 +201,7 @@  discard block
 block discarded – undo
200 201
 		<?php
201 202
 		} else {
202 203
 			echo $label;
204
+}
203 205
 		}
204 206
 
205 207
 		echo '</th>';
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,6 @@
 block discarded – undo
30 30
 use Fisharebest\Webtrees\I18N;
31 31
 use Fisharebest\Webtrees\Individual;
32 32
 use Fisharebest\Webtrees\Media;
33
-use Fisharebest\Webtrees\Module;
34
-use Fisharebest\Webtrees\Module\CensusAssistantModule;
35 33
 use Fisharebest\Webtrees\Note;
36 34
 use Fisharebest\Webtrees\Repository;
37 35
 use Fisharebest\Webtrees\Source;
Please login to merge, or discard this patch.
app/Module/RelativesTabModule.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
 					$row_class .= ' old';
178 178
 				}
179 179
 				$icon = $controller->record === $person ? '<i class="icon-selected"></i>' : '';
180
-        ?>
180
+				?>
181 181
 				<tr class="<?= $row_class ?>">
182 182
 					<th scope="row">
183 183
 					<?= $icon ?>
Please login to merge, or discard this patch.