diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-01-11 11:44:16 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-01-11 11:44:16 +0000 |
| commit | c0804649bf60e006885fb046f075cf3008bf7cb9 (patch) | |
| tree | 44b1e6ffaa50288fe58c3709f13e6663c9856285 /app/Family.php | |
| parent | a2bad81d2834149268aae68b351f387dfde8087e (diff) | |
| download | webtrees-c0804649bf60e006885fb046f075cf3008bf7cb9.tar.gz webtrees-c0804649bf60e006885fb046f075cf3008bf7cb9.tar.bz2 webtrees-c0804649bf60e006885fb046f075cf3008bf7cb9.zip | |
Simplify row-mappers
Diffstat (limited to 'app/Family.php')
| -rw-r--r-- | app/Family.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/Family.php b/app/Family.php index 72cd5a7d11..15c322f489 100644 --- a/app/Family.php +++ b/app/Family.php @@ -65,14 +65,12 @@ class Family extends GedcomRecord /** * A closure which will create a record from a database row. * - * @param Tree $tree - * * @return Closure */ - public static function rowMapper(Tree $tree): Closure + public static function rowMapper(): Closure { - return function (stdClass $row) use ($tree): Family { - return Family::getInstance($row->f_id, $tree, $row->f_gedcom); + return function (stdClass $row): Family { + return Family::getInstance($row->f_id, Tree::findById($row->f_file), $row->f_gedcom); }; } |
