Passed
Push — extract-store ( f24e42...0c7df1 )
by Konrad
04:35
created

QueryHandler::v1()   B

Complexity

Conditions 7
Paths 16

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 8.8142

Importance

Changes 0
Metric Value
cc 7
eloc 5
nc 16
nop 3
dl 0
loc 10
ccs 4
cts 6
cp 0.6667
crap 8.8142
rs 8.8333
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the sweetrdf/InMemoryStoreSqlite package and licensed under
5
 * the terms of the GPL-3 license.
6
 *
7
 * (c) Konrad Abicht <[email protected]>
8
 * (c) Benjamin Nowack
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace sweetrdf\InMemoryStoreSqlite\Store\QueryHandler;
15
16
use sweetrdf\InMemoryStoreSqlite\NamespaceHelper;
17
use sweetrdf\InMemoryStoreSqlite\Store\InMemoryStoreSqlite;
18
19
abstract class QueryHandler
20
{
21
    protected array $errors = [];
22
23
    protected InMemoryStoreSqlite $store;
24
25
    protected string $xsd = NamespaceHelper::NAMESPACE_XSD;
26
27 106
    public function __construct(InMemoryStoreSqlite $store)
28
    {
29 106
        $this->store = $store;
30 106
    }
31
32 97
    public function getTermID($val, $term = '')
33
    {
34 97
        return $this->store->getTermID($val, $term);
35
    }
36
37 24
    public function getValueHash($val)
38
    {
39 24
        return $this->store->getValueHash($val);
40
    }
41
}
42