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/Module/ExtraInformationModule.php | |
| parent | 782f08d9bd2bfa06635da947ee34f8e1afd65088 (diff) | |
| download | webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.gz webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.tar.bz2 webtrees-c1010eda29c0909ed4d5d463f32d32bfefdd4dfe.zip | |
Use PSR2 code style
Diffstat (limited to 'app/Module/ExtraInformationModule.php')
| -rw-r--r-- | app/Module/ExtraInformationModule.php | 137 |
1 files changed, 73 insertions, 64 deletions
diff --git a/app/Module/ExtraInformationModule.php b/app/Module/ExtraInformationModule.php index 2ed6af8a9d..c580a88346 100644 --- a/app/Module/ExtraInformationModule.php +++ b/app/Module/ExtraInformationModule.php @@ -24,75 +24,84 @@ use Fisharebest\Webtrees\Individual; * Class ExtraInformationModule * A sidebar to show non-genealogy information about an individual */ -class ExtraInformationModule extends AbstractModule implements ModuleSidebarInterface { - /** {@inheritdoc} */ - public function getTitle() { - return /* I18N: Name of a module/sidebar */ I18N::translate('Extra information'); - } +class ExtraInformationModule extends AbstractModule implements ModuleSidebarInterface +{ + /** {@inheritdoc} */ + public function getTitle() + { + return /* I18N: Name of a module/sidebar */ + I18N::translate('Extra information'); + } - /** {@inheritdoc} */ - public function getDescription() { - return /* I18N: Description of the “Extra information” module */ I18N::translate('A sidebar showing non-genealogy information about an individual.'); - } + /** {@inheritdoc} */ + public function getDescription() + { + return /* I18N: Description of the “Extra information” module */ + I18N::translate('A sidebar showing non-genealogy information about an individual.'); + } - /** {@inheritdoc} */ - public function defaultSidebarOrder() { - return 10; - } + /** {@inheritdoc} */ + public function defaultSidebarOrder() + { + return 10; + } - /** {@inheritdoc} */ - public function hasSidebarContent(Individual $individual) { - return true; - } + /** {@inheritdoc} */ + public function hasSidebarContent(Individual $individual) + { + return true; + } - /** - * Load this sidebar synchronously. - * - * @param Individual $individual - * - * @return string - */ - public function getSidebarContent(Individual $individual) { - $indifacts = []; - // The individual’s own facts - foreach ($individual->getFacts() as $fact) { - if (self::showFact($fact)) { - $indifacts[] = $fact; - } - } + /** + * Load this sidebar synchronously. + * + * @param Individual $individual + * + * @return string + */ + public function getSidebarContent(Individual $individual) + { + $indifacts = []; + // The individual’s own facts + foreach ($individual->getFacts() as $fact) { + if (self::showFact($fact)) { + $indifacts[] = $fact; + } + } - ob_start(); - if (!$indifacts) { - echo I18N::translate('There are no facts for this individual.'); - } else { - foreach ($indifacts as $fact) { - FunctionsPrintFacts::printFact($fact, $individual); - } - } + ob_start(); + if (!$indifacts) { + echo I18N::translate('There are no facts for this individual.'); + } else { + foreach ($indifacts as $fact) { + FunctionsPrintFacts::printFact($fact, $individual); + } + } - return strip_tags(ob_get_clean(), '<a><div><span>'); - } + return strip_tags(ob_get_clean(), '<a><div><span>'); + } - /** - * Does this module display a particular fact - * - * @param Fact $fact - * - * @return bool - */ - public static function showFact(Fact $fact) { - switch ($fact->getTag()) { - case 'AFN': - case 'CHAN': - case 'IDNO': - case 'REFN': - case 'RFN': - case 'RIN': - case 'SSN': - case '_UID': - return true; - default: - return false; - } - } + /** + * Does this module display a particular fact + * + * @param Fact $fact + * + * @return bool + */ + public static function showFact(Fact $fact) + { + switch ($fact->getTag()) { + case 'AFN': + case 'CHAN': + case 'IDNO': + case 'REFN': + case 'RFN': + case 'RIN': + case 'SSN': + case '_UID': + return true; + default: + return false; + } + } } |
