Test Failed
Branch master (4a3c5b)
by Greg
12:31
created

TimelineController::getSignificantIndividual()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * webtrees: online genealogy
4
 * Copyright (C) 2017 webtrees development team
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
 * GNU General Public License for more details.
13
 * You should have received a copy of the GNU General Public License
14
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
 */
16
namespace Fisharebest\Webtrees\Controller;
17
18
use Fisharebest\Webtrees\Date;
19
use Fisharebest\Webtrees\Date\GregorianDate;
20
use Fisharebest\Webtrees\Fact;
21
use Fisharebest\Webtrees\Family;
22
use Fisharebest\Webtrees\Filter;
23
use Fisharebest\Webtrees\Functions\FunctionsDate;
24
use Fisharebest\Webtrees\Functions\FunctionsPrint;
25
use Fisharebest\Webtrees\Html;
26
use Fisharebest\Webtrees\I18N;
27
use Fisharebest\Webtrees\Individual;
28
use Fisharebest\Webtrees\Theme;
29
30
/**
31
 * Controller for the timeline chart
32
 */
33
class TimelineController extends PageController {
34
	/** @var int Height of the age box */
35
	public $bheight = 30;
36
37
	/** @var Fact[] The facts to display on the chart */
38
	public $indifacts = []; // array to store the fact records in for sorting and displaying
39
40
	/** @var int[] Numeric birth years of each individual */
41
	public $birthyears = [];
42
43
	/** @var int[] Numeric birth months of each individual */
44
	public $birthmonths = [];
45
46
	/** @var int[] Numeric birth days of each individual */
47
	public $birthdays = [];
48
49
	/** @var int Lowest year to display */
50
	public $baseyear = 0;
51
52
	/** @var int Highest year to display */
53
	public $topyear = 0;
54
55
	/** @var Individual[] List of individuals to display */
56
	public $people = [];
57
58
	/** @var string URL-encoded list of XREFs */
59
	public $pidlinks = '';
60
61
	/** @var int Vertical scale */
62
	public $scale = 2;
63
64
	/** @var string[] GEDCOM elements that may have DATE data, but should not be displayed */
65
	private $nonfacts = ['BAPL', 'ENDL', 'SLGC', 'SLGS', '_TODO', 'CHAN'];
66
67
	/**
68
	 * Startup activity
69
	 */
70
	public function __construct() {
71
		parent::__construct();
72
73
		$this->setPageTitle(I18N::translate('Timeline'));
74
75
		$this->baseyear = (int) date('Y');
76
77
		$remove = Filter::get('remove', WT_REGEX_XREF);
78
		$newpid = Filter::get('newpid', WT_REGEX_XREF);
79
		$pids   = Filter::getArray('pids', WT_REGEX_XREF);
80
		$pids[] = $newpid;
81
82
		foreach (array_unique(array_filter($pids)) as $pid) {
83
			if ($pid !== $remove) {
84
				$person = Individual::getInstance($pid, $this->tree());
85
				if ($person && $person->canShow()) {
86
					$this->people[] = $person;
87
				}
88
			}
89
		}
90
		$this->pidlinks = '';
91
92
		foreach ($this->people as $indi) {
93
			// setup string of valid pids for links
94
			$this->pidlinks .= 'pids%5B%5D=' . $indi->getXref() . '&amp;';
95
			$bdate = $indi->getBirthDate();
0 ignored issues
show
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\GedcomRecord. It seems like you code against a sub-type of Fisharebest\Webtrees\GedcomRecord such as Fisharebest\Webtrees\Individual. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();
Loading history...
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\Repository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\Family. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\Source. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\Media. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getBirthDate() does not exist on Fisharebest\Webtrees\Note. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
			/** @scrutinizer ignore-call */ 
96
   $bdate = $indi->getBirthDate();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
96
			if ($bdate->isOK()) {
97
				$date                                = new GregorianDate($bdate->minimumJulianDay());
98
				$this->birthyears [$indi->getXref()] = $date->y;
99
				$this->birthmonths[$indi->getXref()] = max(1, $date->m);
100
				$this->birthdays  [$indi->getXref()] = max(1, $date->d);
101
			}
102
			// find all the fact information
103
			$facts = $indi->getFacts();
104
			foreach ($indi->getSpouseFamilies() as $family) {
0 ignored issues
show
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\Repository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\Media. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\Family. Did you maybe mean getSpouse()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\GedcomRecord. It seems like you code against a sub-type of Fisharebest\Webtrees\GedcomRecord such as Fisharebest\Webtrees\Individual. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {
Loading history...
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\Note. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method getSpouseFamilies() does not exist on Fisharebest\Webtrees\Source. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

104
			foreach ($indi->/** @scrutinizer ignore-call */ getSpouseFamilies() as $family) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
105
				foreach ($family->getFacts() as $fact) {
106
					$facts[] = $fact;
107
				}
108
			}
109
			foreach ($facts as $event) {
110
				// get the fact type
111
				$fact = $event->getTag();
112
				if (!in_array($fact, $this->nonfacts)) {
113
					// check for a date
114
					$date = $event->getDate();
115
					if ($date->isOK()) {
116
						$date           = new GregorianDate($date->minimumJulianDay());
117
						$this->baseyear = min($this->baseyear, $date->y);
118
						$this->topyear  = max($this->topyear, $date->y);
119
120
						if (!$indi->isDead()) {
0 ignored issues
show
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\Source. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\Repository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\Media. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\Note. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\Family. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
Bug introduced by
The method isDead() does not exist on Fisharebest\Webtrees\GedcomRecord. It seems like you code against a sub-type of Fisharebest\Webtrees\GedcomRecord such as Fisharebest\Webtrees\Individual. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

120
						if (!$indi->/** @scrutinizer ignore-call */ isDead()) {
Loading history...
121
							$this->topyear = max($this->topyear, (int) date('Y'));
122
						}
123
124
						// do not add the same fact twice (prevents marriages from being added multiple times)
125
						if (!in_array($event, $this->indifacts, true)) {
126
							$this->indifacts[] = $event;
127
						}
128
					}
129
				}
130
			}
131
		}
132
		$scale = Filter::getInteger('scale', 0, 200);
133
		if ($scale === 0) {
134
			$this->scale = (int) (($this->topyear - $this->baseyear) / 20 * count($this->indifacts) / 4);
135
			if ($this->scale < 6) {
136
				$this->scale = 6;
137
			}
138
		} else {
139
			$this->scale = $scale;
140
		}
141
		if ($this->scale < 2) {
142
			$this->scale = 2;
143
		}
144
		$this->baseyear -= 5;
145
		$this->topyear += 5;
146
	}
147
148
	/**
149
	 * Print a fact for an individual.
150
	 *
151
	 * @param Fact $event
152
	 */
153
	public function printTimeFact(Fact $event) {
154
		global $factcount, $placements;
155
156
		$desc = $event->getValue();
157
		// check if this is a family fact
158
		$gdate    = $event->getDate();
159
		$date     = $gdate->minimumDate();
160
		$date     = $date->convertToCalendar('gregorian');
161
		$year     = $date->y;
162
		$month    = max(1, $date->m);
163
		$day      = max(1, $date->d);
164
		$xoffset  = 0 + 22;
165
		$yoffset  = 0 + (($year - $this->baseyear) * $this->scale) - ($this->scale);
166
		$yoffset  = $yoffset + (($month / 12) * $this->scale);
167
		$yoffset  = $yoffset + (($day / 30) * ($this->scale / 12));
168
		$yoffset  = (int) ($yoffset);
169
		$place    = (int) ($yoffset / $this->bheight);
170
		$i        = 1;
171
		$j        = 0;
172
		$tyoffset = 0;
173
		while (isset($placements[$place])) {
174
			if ($i === $j) {
175
				$tyoffset = $this->bheight * $i;
176
				$i++;
177
			} else {
178
				$tyoffset = -1 * $this->bheight * $j;
179
				$j++;
180
			}
181
			$place = (int) (($yoffset + $tyoffset) / ($this->bheight));
182
		}
183
		$yoffset += $tyoffset;
184
		$xoffset += abs($tyoffset);
185
		$placements[$place] = $yoffset;
186
187
		echo "<div id=\"fact$factcount\" style=\"position:absolute; " . (I18N::direction() === 'ltr' ? 'left: ' . ($xoffset) : 'right: ' . ($xoffset)) . 'px; top:' . ($yoffset) . 'px; font-size: 8pt; height: ' . ($this->bheight) . "px;\" onmousedown=\"factMouseDown(this, '" . $factcount . "', " . ($yoffset - $tyoffset) . ');">';
188
		echo '<table cellspacing="0" cellpadding="0" border="0" style="cursor: hand;"><tr><td>';
189
		echo '<img src="' . Theme::theme()->parameter('image-hline') . '" name="boxline' . $factcount . '" id="boxline' . $factcount . '" height="3" width="10" style="padding-';
190
		if (I18N::direction() === 'ltr') {
191
			echo 'left: 3px;">';
192
		} else {
193
			echo 'right: 3px;">';
194
		}
195
196
		$col = array_search($event->getParent(), $this->people);
197
		if ($col === false) {
198
			// Marriage event - use the color of the husband
199
			$col = array_search($event->getParent()->getHusband(), $this->people);
0 ignored issues
show
Bug introduced by
The method getHusband() does not exist on Fisharebest\Webtrees\GedcomRecord. It seems like you code against a sub-type of Fisharebest\Webtrees\GedcomRecord such as Fisharebest\Webtrees\Family. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

199
			$col = array_search($event->getParent()->/** @scrutinizer ignore-call */ getHusband(), $this->people);
Loading history...
200
		}
201
		if ($col === false) {
202
			// Marriage event - use the color of the wife
203
			$col = array_search($event->getParent()->getWife(), $this->people);
0 ignored issues
show
Bug introduced by
The method getWife() does not exist on Fisharebest\Webtrees\GedcomRecord. It seems like you code against a sub-type of Fisharebest\Webtrees\GedcomRecord such as Fisharebest\Webtrees\Family. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

203
			$col = array_search($event->getParent()->/** @scrutinizer ignore-call */ getWife(), $this->people);
Loading history...
204
		}
205
		$col = $col % 6;
206
		echo '</td><td class="person' . $col . '">';
207
		if (count($this->people) > 6) {
208
			// We only have six colours, so show naes if more than this number
209
			echo $event->getParent()->getFullName() . ' — ';
210
		}
211
		$record = $event->getParent();
212
		echo $event->getLabel();
213
		echo ' — ';
214
		if ($record instanceof Individual) {
215
			echo FunctionsPrint::formatFactDate($event, $record, false, false);
216
		} elseif ($record instanceof Family) {
217
			echo $gdate->display();
218 View Code Duplication
			if ($record->getHusband() && $record->getHusband()->getBirthDate()->isOK()) {
219
				$ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getHusband()->getBirthDate(), $gdate));
220
			} else {
221
				$ageh = null;
222
			}
223 View Code Duplication
			if ($record->getWife() && $record->getWife()->getBirthDate()->isOK()) {
224
				$agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getWife()->getBirthDate(), $gdate));
225
			} else {
226
				$agew = null;
227
			}
228
			if ($ageh && $agew) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $ageh of type null|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
Bug Best Practice introduced by
The expression $agew of type null|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
229
				echo '<span class="age"> ', I18N::translate('Husband’s age'), ' ', $ageh, ' ', I18N::translate('Wife’s age'), ' ', $agew, '</span>';
230
			} elseif ($ageh) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $ageh of type null|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
231
				echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>';
232
			} elseif ($agew) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $agew of type null|string is loosely compared to true; this is ambiguous if the string can be empty. You might want to explicitly use !== null instead.

In PHP, under loose comparison (like ==, or !=, or switch conditions), values of different types might be equal.

For string values, the empty string '' is a special case, in particular the following results might be unexpected:

''   == false // true
''   == null  // true
'ab' == false // false
'ab' == null  // false

// It is often better to use strict comparison
'' === false // false
'' === null  // false
Loading history...
233
				echo '<span class="age"> ', I18N::translate('Age'), ' ', $ageh, '</span>';
234
			}
235
		}
236
		echo ' ' . Html::escape($desc);
237
		if (!$event->getPlace()->isEmpty()) {
238
			echo ' — ' . $event->getPlace()->getShortName();
239
		}
240
		// Print spouses names for family events
241
		if ($event->getParent() instanceof Family) {
242
			echo ' — <a href="', $event->getParent()->getHtmlUrl(), '">', $event->getParent()->getFullName(), '</a>';
243
		}
244
		echo '</td></tr></table>';
245
		echo '</div>';
246 View Code Duplication
		if (I18N::direction() === 'ltr') {
247
			$img  = 'image-dline2';
248
			$ypos = '0%';
249
		} else {
250
			$img  = 'image-dline';
251
			$ypos = '100%';
252
		}
253
		$dyoffset = ($yoffset - $tyoffset) + $this->bheight / 3;
254
		if ($tyoffset < 0) {
255
			$dyoffset = $yoffset + $this->bheight / 3;
256 View Code Duplication
			if (I18N::direction() === 'ltr') {
257
				$img  = 'image-dline';
258
				$ypos = '100%';
259
			} else {
260
				$img  = 'image-dline2';
261
				$ypos = '0%';
262
			}
263
		}
264
		// Print the diagonal line
265
		echo '<div id="dbox' . $factcount . '" style="position:absolute; ' . (I18N::direction() === 'ltr' ? 'left: ' . (0 + 25) : 'right: ' . (0 + 25)) . 'px; top:' . ($dyoffset) . 'px; font-size: 8pt; height: ' . abs($tyoffset) . 'px; width: ' . abs($tyoffset) . 'px;';
266
		echo ' background-image: url(\'' . Theme::theme()->parameter($img) . '\');';
267
		echo ' background-position: 0% ' . $ypos . ';">';
268
		echo '</div>';
269
	}
270
271
	/**
272
	 * Get significant information from this page, to allow other pages such as
273
	 * charts and reports to initialise with the same records
274
	 *
275
	 * @return Individual
276
	 */
277
	public function getSignificantIndividual() {
278
		if ($this->people) {
0 ignored issues
show
Bug Best Practice introduced by
The expression $this->people of type Fisharebest\Webtrees\Individual[] is implicitly converted to a boolean; are you sure this is intended? If so, consider using ! empty($expr) instead to make it clear that you intend to check for an array without elements.

This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.

Consider making the comparison explicit by using empty(..) or ! empty(...) instead.

Loading history...
279
			return $this->people[0];
280
		} else {
281
			return parent::getSignificantIndividual();
282
		}
283
	}
284
}
285