Refn   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 8 1
1
<?php
2
3
namespace FamilyTree365\LaravelGedcom\Utils\Importer;
4
5
use FamilyTree365\LaravelGedcom\Models\Refn as MRefn;
6
7
class Refn
8
{
9
    /**
10
     * Gedcom\Record\Refn $noteref
11
     * String $group
12
     * Integer $group_id.
13
     */
14
    public static function read($conn, \Gedcom\Record\Refn $refn, $group = '', $group_id = 0)
15
    {
16
        $_refn = $refn->getRefn();
17
        $type = $refn->getType();
18
        // store refn
19
        $key = ['group'=>$group, 'gid'=>$group_id, 'refn'=>$_refn, 'type'=>$type];
20
        $data = ['group'=>$group, 'gid'=>$group_id, 'refn'=>$_refn, 'type'=>$type];
21
        $record = MRefn::on($conn)->updateOrCreate($key, $data);
0 ignored issues
show
Unused Code introduced by
The assignment to $record is dead and can be removed.
Loading history...
22
    }
23
}
24