diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-03-07 18:49:27 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-03-07 21:37:35 +0000 |
| commit | e364afe4ae4e316fc4ebd53eccbaff2d29e419a5 (patch) | |
| tree | 9e269d16bd3714e9943169fc4a31c192b065c36c /app/Fact.php | |
| parent | 7d99559cb9c1475576caf7ef2fe79a5aad947d30 (diff) | |
| download | webtrees-e364afe4ae4e316fc4ebd53eccbaff2d29e419a5.tar.gz webtrees-e364afe4ae4e316fc4ebd53eccbaff2d29e419a5.tar.bz2 webtrees-e364afe4ae4e316fc4ebd53eccbaff2d29e419a5.zip | |
Code style and testing
Diffstat (limited to 'app/Fact.php')
| -rw-r--r-- | app/Fact.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/Fact.php b/app/Fact.php index 524783cfbd..c866a8e39a 100644 --- a/app/Fact.php +++ b/app/Fact.php @@ -327,7 +327,7 @@ class Fact return $this->record->canEdit() && !$this->isPendingDeletion() && ( Auth::isManager($this->record->tree()) || - Auth::isEditor($this->record->tree()) && strpos($this->gedcom, "\n2 RESN locked") === false && $this->getTag() != 'RESN' && $this->getTag() != 'CHAN' + Auth::isEditor($this->record->tree()) && strpos($this->gedcom, "\n2 RESN locked") === false && $this->getTag() !== 'RESN' && $this->getTag() !== 'CHAN' ); } @@ -398,7 +398,7 @@ class Fact * * @return void */ - public function setTag($tag) + public function setTag($tag): void { $this->tag = $tag; } @@ -433,7 +433,7 @@ class Fact * * @return void */ - public function setPendingDeletion() + public function setPendingDeletion(): void { $this->pending_deletion = true; $this->pending_addition = false; @@ -454,7 +454,7 @@ class Fact * * @return void */ - public function setPendingAddition() + public function setPendingAddition(): void { $this->pending_addition = true; $this->pending_deletion = false; @@ -554,14 +554,14 @@ class Fact // Fact date $date = $this->date(); if ($date->isOK()) { - if (in_array($this->getTag(), Gedcom::BIRTH_EVENTS) && $this->record() instanceof Individual && $this->record()->tree()->getPreference('SHOW_PARENTS_AGE')) { + if ($this->record() instanceof Individual && in_array($this->getTag(), Gedcom::BIRTH_EVENTS, true) && $this->record()->tree()->getPreference('SHOW_PARENTS_AGE')) { $attributes[] = $date->display() . FunctionsPrint::formatParentsAges($this->record(), $date); } else { $attributes[] = $date->display(); } } // Fact place - if ($this->place()->gedcomName() <> '') { + if ($this->place()->gedcomName() !== '') { $attributes[] = $this->place()->shortName(); } } |
