Completed
Pull Request — master (#9)
by Samuel
15:22
created

EmptyStructure   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getActiveRowClass() 0 4 1
A getSelectionClass() 0 4 1
A getScopes() 0 4 1
A getScope() 0 4 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
     * Fetch row class by table
13
     * @param string $table
14
     * @return string
15
     */
16
    public function getActiveRowClass(string $table): string
17
    {
18
        return ActiveRow::class;
19
    }
20
21
    /**
22
     * Fetch selection class by table
23
     * @param string $table
24
     * @return string
25
     */
26
    public function getSelectionClass(string $table): string
27
    {
28
        return Selection::class;
29
    }
30
31
    /**
32
     * Returns all scopes registered for table
33
     * @param string $table
34
     * @return array
35
     */
36
    public function getScopes(string $table): array
37
    {
38
        return [];
39
    }
40
41
    /**
42
     * Returns one scope
43
     * @param string $table
44
     * @param string $scope
45
     * @return Scope|null
46
     */
47
    public function getScope(string $table, string $scope): ?Scope
48
    {
49
        return null;
50
    }
51
}
52