Passed
Pull Request — master (#6834)
by Massimiliano
15:53
created

DatabasePlatformMock::getReservedKeywordsClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\Mocks;
4
5
use Doctrine\DBAL\Platforms\AbstractPlatform;
6
7
/**
8
 * Mock class for DatabasePlatform.
9
 */
10
class DatabasePlatformMock extends AbstractPlatform
11
{
12
    /**
13
     * @var string
14
     */
15
    private $_sequenceNextValSql = "";
16
17
    /**
18
     * @var bool
19
     */
20
    private $_prefersIdentityColumns = true;
21
22
    /**
23
     * @var bool
24
     */
25
    private $_prefersSequences = false;
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function prefersIdentityColumns()
31
    {
32
        return $this->_prefersIdentityColumns;
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function prefersSequences()
39
    {
40
        return $this->_prefersSequences;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getSequenceNextValSQL($sequenceName)
47
    {
48
        return $this->_sequenceNextValSql;
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getBooleanTypeDeclarationSQL(array $field)
55
    {
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function getIntegerTypeDeclarationSQL(array $field)
62
    {
63
    }
64
65
    /**
66
     * {@inheritdoc}
67
     */
68
    public function getBigIntTypeDeclarationSQL(array $field)
69
    {
70
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75
    public function getSmallIntTypeDeclarationSQL(array $field)
76
    {
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef)
83
    {
84
    }
85
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function getVarcharTypeDeclarationSQL(array $field)
90
    {
91
    }
92
93
    /**
94
     * {@inheritdoc}
95
     */
96
    public function getClobTypeDeclarationSQL(array $field)
97
    {
98
    }
99
100
    /* MOCK API */
101
102
    /**
103
     * @param bool $bool
104
     *
105
     * @return void
106
     */
107
    public function setPrefersIdentityColumns($bool)
108
    {
109
        $this->_prefersIdentityColumns = $bool;
110
    }
111
112
    /**
113
     * @param bool $bool
114
     *
115
     * @return void
116
     */
117
    public function setPrefersSequences($bool)
118
    {
119
        $this->_prefersSequences = $bool;
120
    }
121
122
    /**
123
     * @param string $sql
124
     *
125
     * @return void
126
     */
127
    public function setSequenceNextValSql($sql)
128
    {
129
        $this->_sequenceNextValSql = $sql;
130
    }
131
132
    /**
133
     * {@inheritdoc}
134
     */
135
    public function getName()
136
    {
137
        return 'mock';
138
    }
139
140
    /**
141
     * {@inheritdoc}
142
     */
143
    protected function initializeDoctrineTypeMappings()
144
    {
145
    }
146
147
    /**
148
     * {@inheritdoc}
149
     */
150
    public function getBlobTypeDeclarationSQL(array $field)
151
    {
152
        throw DBALException::notSupported(__METHOD__);
153
    }
154
155
    /**
156
     * {@inheritdoc}
157
     */
158
    protected function getReservedKeywordsClass()
159
    {
160
        return KeywordListMock::class;
161
    }
162
}
163