Enum::getSQLDeclaration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * neuralyzer : Data Anonymization Library and CLI Tool
7
 *
8
 * PHP Version 7.2
9
 *
10
 * @author    Emmanuel Dyan
11
 *
12
 * @copyright 2020 Emmanuel Dyan
13
 *
14
 * @package edyan/neuralyzer
15
 *
16
 * @license GNU General Public License v2.0
17
 *
18
 * @link https://github.com/edyan/neuralyzer
19
 */
20
21
namespace Edyan\Neuralyzer\Doctrine\Type;
22
23
use Doctrine\DBAL\Platforms\AbstractPlatform;
24
use Doctrine\DBAL\Types\Type;
25
26
/**
27
 * Class Enum
28
 *
29
 * @package edyan/neuralyzer
30
 */
31 1
class Enum extends Type
32
{
33 1
    /**
34
     * {@inheritdoc}
35
     */
36
    public function getName()
37
    {
38
        return 'enum';
39 1
    }
40
41 1
    /**
42
     * {@inheritdoc}
43
     */
44
    public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
45
    {
46
        return 'ENUM()';
47 1
    }
48
49 1
    /**
50
     * {@inheritdoc}
51
     */
52
    public function requiresSQLCommentHint(AbstractPlatform $platform)
53
    {
54
        return true;
55
    }
56
}
57