Enum   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getSQLDeclaration() 0 3 1
A requiresSQLCommentHint() 0 3 1
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