SyncCensus   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 30
dl 0
loc 39
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFields() 0 30 1
1
<?php
2
3
namespace App\Jobs\Geneanum\Malta;
4
5
use App\Jobs\Geneanum\Sync;
6
7
class SyncCensus extends Sync
8
{
9
    protected const AREA = 'Malta';
10
    protected const DATABASE = 'Censuses';
11
    protected const URL = 'https://static.geneanum.com/libs/grid/malte_recensement.php?annee_limite=75&_search=false&nd=%s&rows=100&page=%s&sidx=paroisse&sord=asc';
12
13
    /**
14
     * @inheritDoc
15
     */
16
    protected function getFields(array $row): array
17
    {
18
        [
19
            $order_no,
20
            $parish,
21
            $year,
22
            $family_no,
23
            $last_name,
24
            $first_name,
25
            $age,
26
            $observation1,
27
            $inferred_birth,
28
            $observation2,
29
            $observation3,
30
            $source,
31
        ] = $row['cell'];
32
33
        return [
34
            'order_no' => $order_no,
35
            'parish' => $parish,
36
            'year' => $year,
37
            'family_no' => $family_no,
38
            'first_name' => $first_name,
39
            'last_name' => $last_name,
40
            'age' => $age,
41
            'observation1' => $observation1,
42
            'inferred_birth' => $inferred_birth,
43
            'observation2' => $observation2,
44
            'observation3' => $observation3,
45
            'source' => $source,
46
        ];
47
    }
48
}
49