Completed
Pull Request — master (#9)
by Samuel
03:17
created

EmptyStructure::getActiveRowClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SimpleMapper\Structure;
5
6
use SimpleMapper\ActiveRow;
7
use SimpleMapper\Scope\Scope;
8
use SimpleMapper\Selection;
9
10
class EmptyStructure implements Structure
11
{
12
    /**
13
     * Register new active row class for table
14
     * @param string $tableName
15
     * @param string $activeRowClass
16
     * @return Structure
17
     */
18 4
    public function registerActiveRowClass(string $tableName, string $activeRowClass): Structure
19
    {
20 4
        return $this;
21
    }
22
23
    /**
24
     * Register new selection class for table
25
     * @param string $tableName
26
     * @param string $selectionClass
27
     * @return Structure
28
     */
29 2
    public function registerSelectionClass(string $tableName, string $selectionClass): Structure
30
    {
31 2
        return $this;
32
    }
33
34
    /**
35
     * Register new scopes for table
36
     * @param string $tableName
37
     * @param array $scopes
38
     * @return Structure
39
     */
40 2
    public function registerScopes(string $tableName, array $scopes): Structure
41
    {
42 2
        return $this;
43
    }
44
45
    /**
46
     * Fetch row class by table
47
     * @param string $table
48
     * @return string
49
     */
50 4
    public function getActiveRowClass(string $table): string
51
    {
52 4
        return ActiveRow::class;
53
    }
54
55
    /**
56
     * Fetch selection class by table
57
     * @param string $table
58
     * @return string
59
     */
60 4
    public function getSelectionClass(string $table): string
61
    {
62 4
        return Selection::class;
63
    }
64
65
    /**
66
     * Returns all scopes registered for table
67
     * @param string $table
68
     * @return array
69
     */
70 2
    public function getScopes(string $table): array
71
    {
72 2
        return [];
73
    }
74
75
    /**
76
     * Returns one scope
77
     * @param string $table
78
     * @param string $scope
79
     * @return Scope|null
80
     */
81 2
    public function getScope(string $table, string $scope): ?Scope
82
    {
83 2
        return null;
84
    }
85
}
86