Passed
Push — master ( 02118d...11fb63 )
by Petr
03:00
created

ADatabase::updateRecord()   B

Complexity

Conditions 8
Paths 13

Size

Total Lines 26
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 16
CRAP Score 8

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 8
eloc 16
c 1
b 0
f 0
nc 13
nop 1
dl 0
loc 26
ccs 16
cts 16
cp 1
crap 8
rs 8.4444
1
<?php
2
3
namespace kalanis\kw_mapper\Mappers\Database;
4
5
6
use kalanis\kw_mapper\MapperException;
7
use kalanis\kw_mapper\Mappers\AMapper;
8
use kalanis\kw_mapper\Storage;
9
10
11
/**
12
 * Class ADatabase
13
 * @package kalanis\kw_mapper\Mappers\Database
14
 */
15
abstract class ADatabase extends AMapper
16
{
17
    use TTable;
18
    use TReadDatabase;
19
    use TWriteDatabase;
20
21
    /**
22
     * @throws MapperException
23
     */
24 12
    public function __construct()
25
    {
26 12
        parent::__construct();
27
28 12
        $this->initTReadDatabase();
29 12
        $this->initTWriteDatabase();
30 12
    }
31
32 36
    public function getAlias(): string
33
    {
34 36
        return $this->getTable();
35
    }
36
37 12
    protected function getReadSource(): string
38
    {
39 12
        return $this->getSource();
40
    }
41
42 12
    protected function getWriteSource(): string
43
    {
44 12
        return $this->getSource();
45
    }
46
}
47