PedigreeRecord   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 16
ccs 13
cts 13
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A addEntries() 0 14 1
1
<?php
2
3
namespace kalanis\kw_pedigree\Storage\File;
4
5
6
use kalanis\kw_mapper\Interfaces\IEntryType;
7
use kalanis\kw_pedigree\Interfaces\ISex;
8
use kalanis\kw_pedigree\Storage\APedigreeRecord;
9
10
11
/**
12
 * Class PedigreeRecord
13
 * @package kalanis\kw_pedigree\Storage\File
14
 * @property string $fatherId
15
 * @property string $motherId
16
 */
17
class PedigreeRecord extends APedigreeRecord
18
{
19 17
    protected function addEntries(): void
20
    {
21 17
        $this->addEntry('id', IEntryType::TYPE_INTEGER, 65536);
22 17
        $this->addEntry('short', IEntryType::TYPE_STRING, 64);
23 17
        $this->addEntry('name', IEntryType::TYPE_STRING, 75);
24 17
        $this->addEntry('family', IEntryType::TYPE_STRING, 255);
25 17
        $this->addEntry('birth', IEntryType::TYPE_STRING, 32);
26 17
        $this->addEntry('death', IEntryType::TYPE_STRING, 32);
27 17
        $this->addEntry('fatherId', IEntryType::TYPE_INTEGER, 65536);
28 17
        $this->addEntry('motherId', IEntryType::TYPE_INTEGER, 65536);
29 17
        $this->addEntry('successes', IEntryType::TYPE_STRING, 255);
30 17
        $this->addEntry('sex', IEntryType::TYPE_SET, [ISex::MALE, ISex::FEMALE]);
31 17
        $this->addEntry('text', IEntryType::TYPE_STRING, 8192);
32 17
        $this->setMapper(PedigreeMapper::class);
33 17
    }
34
}
35