Desi   A
last analyzed

Complexity

Total Complexity 2

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 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A read() 0 8 2
1
<?php
2
3
namespace FamilyTree365\LaravelGedcom\Utils\Exporter\Indi;
4
5
use FamilyTree365\LaravelGedcom\Models\PersonDesi;
6
7
class Desi
8
{
9
    /**
10
     * String $desi
11
     * String $group
12
     * Integer $group_id.
13
     */
14
    public static function read($conn, string $desi, $group = '', $group_id = 0, $subm_ids)
15
    {
16
        // store alia
17
        if (isset($subm_ids[$desi])) {
18
            $subm_id = $subm_ids[$desi];
0 ignored issues
show
Unused Code introduced by
The assignment to $subm_id is dead and can be removed.
Loading history...
19
            $key = ['group'=>$group, 'gid'=>$group_id, 'desi'=>$desi];
20
            $data = ['group'=>$group, 'gid'=>$group_id, 'desi'=>$desi];
21
            $record = PersonDesi::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
}
25