Completed
Push — master ( 6067eb...3f355c )
by Samuel
15:57 queued 01:01
created

EmptyStructure   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 76
rs 10

7 Methods

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