Passed
Pull Request — master (#3084)
by
unknown
05:55
created
app/GedcomRecordFactory.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/GedcomRecord.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
      * @throws Exception
184 184
      */
185 185
     public static function getInstance(string $xref, Tree $tree, string $gedcom = null)
186
-    {        
186
+    {
187 187
         if (!Application::getInstance()->bound(GedcomRecordFactories::class)) {
188 188
           Application::getInstance()->singleton(GedcomRecordFactories::class);
189 189
         }        
Please login to merge, or discard this patch.
app/GedcomRecordFactories.php 1 patch
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@  discard block
 block discarded – undo
33 33
 use Fisharebest\Webtrees\Source;
34 34
 use stdClass;
35 35
 
36
-class GedcomRecordFactories {
36
+class GedcomRecordFactories
37
+{
37 38
 
38 39
   /** @var GedcomRecord[][] Allow getInstance() to return references to existing objects */
39 40
   protected $gedcom_record_cache;
@@ -43,10 +44,12 @@  discard block
 block discarded – undo
43 44
   
44 45
   protected $factories = [];
45 46
 
46
-  public function __construct() {
47
+  public function __construct()
48
+  {
47 49
   }
48 50
   
49
-  public function addFactory(string $type, GedcomRecordFactory $factory) {
51
+  public function addFactory(string $type, GedcomRecordFactory $factory)
52
+  {
50 53
     $this->factories[$type] = $factory;
51 54
   }
52 55
 
@@ -62,7 +65,8 @@  discard block
 block discarded – undo
62 65
    * @throws Exception
63 66
    * @return GedcomRecord|Individual|Family|Source|Repository|Media|Note|null
64 67
    */
65
-  public function getInstance(string $xref, Tree $tree, string $gedcom = null) {
68
+  public function getInstance(string $xref, Tree $tree, string $gedcom = null)
69
+  {
66 70
     $tree_id = $tree->id();
67 71
 
68 72
     // Is this record already in the cache?
@@ -162,7 +166,8 @@  discard block
 block discarded – undo
162 166
     return $record;
163 167
   }
164 168
 
165
-  public function clearCache() {
169
+  public function clearCache()
170
+  {
166 171
     // Clear the cache
167 172
     $this->gedcom_record_cache = [];
168 173
     $this->pending_record_cache = [];
Please login to merge, or discard this patch.