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

QueryHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 21
rs 10
ccs 7
cts 7
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getValueHash() 0 3 1
A getTermID() 0 3 1
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