@@ -29,7 +29,8 @@ |
||
| 29 | 29 | use Fisharebest\Webtrees\Repository; |
| 30 | 30 | use Fisharebest\Webtrees\Source; |
| 31 | 31 | |
| 32 | -interface GedcomRecordFactoriesInterface { |
|
| 32 | +interface GedcomRecordFactoriesInterface |
|
| 33 | +{ |
|
| 33 | 34 | |
| 34 | 35 | /** |
| 35 | 36 | * Add (or replace) a factory for a specific type, e.g. 'INDI', 'FAM' ... |
@@ -22,7 +22,8 @@ |
||
| 22 | 22 | use Fisharebest\Webtrees\GedcomRecord; |
| 23 | 23 | use Fisharebest\Webtrees\Tree; |
| 24 | 24 | |
| 25 | -interface GedcomRecordFactory { |
|
| 25 | +interface GedcomRecordFactory |
|
| 26 | +{ |
|
| 26 | 27 | |
| 27 | 28 | public function createRecord(string $xref, string $gedcom, ?string $pending, Tree $tree): GedcomRecord; |
| 28 | 29 | |
@@ -34,7 +34,8 @@ discard block |
||
| 34 | 34 | use Fisharebest\Webtrees\Submitter; |
| 35 | 35 | use stdClass; |
| 36 | 36 | |
| 37 | -class GedcomRecordFactories implements GedcomRecordFactoriesInterface { |
|
| 37 | +class GedcomRecordFactories implements GedcomRecordFactoriesInterface |
|
| 38 | +{ |
|
| 38 | 39 | |
| 39 | 40 | /** @var GedcomRecord[][] Allow getInstance() to return references to existing objects */ |
| 40 | 41 | protected $gedcom_record_cache; |
@@ -44,7 +45,8 @@ discard block |
||
| 44 | 45 | |
| 45 | 46 | protected $factories = []; |
| 46 | 47 | |
| 47 | - public function __construct() { |
|
| 48 | + public function __construct() |
|
| 49 | + { |
|
| 48 | 50 | } |
| 49 | 51 | |
| 50 | 52 | public function setFactory(string $type, GedcomRecordFactory $factory): void |
@@ -64,7 +66,8 @@ discard block |
||
| 64 | 66 | * @throws Exception |
| 65 | 67 | * @return GedcomRecord|Individual|Family|Source|Repository|Media|Note|null |
| 66 | 68 | */ |
| 67 | - public function getInstance(string $xref, Tree $tree, string $gedcom = null) { |
|
| 69 | + public function getInstance(string $xref, Tree $tree, string $gedcom = null) |
|
| 70 | + { |
|
| 68 | 71 | $tree_id = $tree->id(); |
| 69 | 72 | |
| 70 | 73 | // Is this record already in the cache? |