FileTable::childNotExist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
namespace kalanis\kw_mapper\Search\Connector;
4
5
6
use kalanis\kw_mapper\Interfaces\IQueryBuilder;
7
use kalanis\kw_mapper\MapperException;
8
use kalanis\kw_mapper\Records\ARecord;
9
use kalanis\kw_mapper\Storage;
10
11
12
/**
13
 * Class FileTable
14
 * @package kalanis\kw_mapper\Search
15
 * Connect file containing table as datasource
16
 */
17
class FileTable extends Records
18
{
19 1
    public function child(string $childAlias, string $joinType = IQueryBuilder::JOIN_LEFT, string $parentAlias = '', string $customAlias = ''): AConnector
20
    {
21
        // @todo idea: how it will work
22
        //      - from the most far ones load records and filter them by other params
23
        //      - them continue back and compare already available join params defined for each pair
24
        //      - the foremost records will be only that which has been available by previously selected ones
25
        //    De facto do the full table engine inside the php
26 1
        throw new MapperException('Cannot make relations over files!');
27
    }
28
29 1
    public function childNotExist(string $childAlias, string $table, string $column, string $parentAlias = ''): AConnector
30
    {
31 1
        throw new MapperException('Cannot make relations over files!');
32
    }
33
34
    /**
35
     * @throws MapperException
36
     * @return ARecord[]
37
     */
38 17
    protected function getInitialRecords(): array
39
    {
40 17
        return $this->basicRecord->loadMultiple();
41
    }
42
}
43