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

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