Passed
Push — master ( 6f3564...5d9325 )
by Curtis
12:40
created

Even   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 9 1
1
<?php
2
3
namespace FamilyTree365\LaravelGedcom\Utils\Exporter\Sour\Data;
4
5
use FamilyTree365\LaravelGedcom\Models\SourceDataEven;
6
7
class Even
8
{
9
    /**
10
     * Gedcom\Record\Sour\Data\Even $even
11
     * String $group
12
     * Integer $group_id.
13
     */
14
    public static function read($conn, \Gedcom\Record\Sour\Data\Even $even, $group = '', $group_id = 0)
15
    {
16
        $date = $even->getDate();
17
        $plac = $even->getPlac();
18
19
        // store Even of source/data
20
        $key = ['group'=>$group, 'gid'=>$group_id, 'date'=>$date, 'plac'=>$plac];
21
        $data = ['group'=>$group, 'gid'=>$group_id, 'date'=>$date, 'plac'=>$plac];
22
        $record = SourceDataEven::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...
23
    }
24
}
25