diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-11-11 08:56:36 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-11-18 09:14:43 +0000 |
| commit | 905ab80a6c5f0edd40befb52ad356666b2d993f9 (patch) | |
| tree | 3f951a2ce5014eb8caabc754aea93ed4e623e99c /app/Fact.php | |
| parent | 2decada70ae5df289448aadc0d1089d2606545d1 (diff) | |
| download | webtrees-905ab80a6c5f0edd40befb52ad356666b2d993f9.tar.gz webtrees-905ab80a6c5f0edd40befb52ad356666b2d993f9.tar.bz2 webtrees-905ab80a6c5f0edd40befb52ad356666b2d993f9.zip | |
Rename Fact::getFactId() to id()
Diffstat (limited to 'app/Fact.php')
| -rw-r--r-- | app/Fact.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/Fact.php b/app/Fact.php index a7f70cd030..0c73158c34 100644 --- a/app/Fact.php +++ b/app/Fact.php @@ -132,7 +132,7 @@ class Fact ]; /** @var string Unique identifier for this fact (currently implemented as a hash of the raw data). */ - private $fact_id; + private $id; /** @var GedcomRecord The GEDCOM record from which this fact is taken */ private $record; @@ -165,17 +165,17 @@ class Fact * * @param string $gedcom * @param GedcomRecord $parent - * @param string $fact_id + * @param string $id * * @throws InvalidArgumentException */ - public function __construct($gedcom, GedcomRecord $parent, $fact_id) + public function __construct($gedcom, GedcomRecord $parent, $id) { if (preg_match('/^1 (' . WT_REGEX_TAG . ')/', $gedcom, $match)) { - $this->gedcom = $gedcom; - $this->record = $parent; - $this->fact_id = $fact_id; - $this->tag = $match[1]; + $this->gedcom = $gedcom; + $this->record = $parent; + $this->id = $id; + $this->tag = $match[1]; } else { throw new InvalidArgumentException('Invalid GEDCOM data passed to Fact::_construct(' . $gedcom . ')'); } @@ -341,9 +341,9 @@ class Fact * * @return string */ - public function getFactId(): string + public function id(): string { - return $this->fact_id; + return $this->id; } /** @@ -655,6 +655,6 @@ class Fact */ public function __toString() { - return $this->fact_id . '@' . $this->record->getXref(); + return $this->id . '@' . $this->record->getXref(); } } |
