Completed
Pull Request — develop (#3255)
by Michael
83:40 queued 22:31
created

StringType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSQLDeclaration() 0 3 1
A getName() 0 3 1
1
<?php
2
3
namespace Doctrine\DBAL\Types;
4
5
use Doctrine\DBAL\Platforms\AbstractPlatform;
6
7
/**
8
 * Type that maps an SQL VARCHAR to a PHP string.
9
 *
10
 * @since 2.0
11
 */
12
class StringType extends Type
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17 3927
    public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
18
    {
19 3927
        return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 16
    public function getName()
26
    {
27 16
        return Type::STRING;
28
    }
29
}
30