Completed
Push — master ( 9800c9...34c9ed )
by Kamil
18:26
created

TextareaAttributeType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 25
rs 10
c 1
b 1
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getStorageType() 0 4 1
A getType() 0 4 1
A validate() 0 1 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Component\Attribute\AttributeType;
13
14
use Sylius\Component\Attribute\Model\AttributeValueInterface;
15
use Symfony\Component\Validator\Context\ExecutionContextInterface;
16
17
/**
18
 * @author Mateusz Zalewski <[email protected]>
19
 */
20
class TextareaAttributeType implements AttributeTypeInterface
21
{
22
    const TYPE = 'textarea';
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getStorageType()
28
    {
29
        return AttributeValueInterface::STORAGE_TEXT;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function getType()
36
    {
37
        return static::TYPE;
38
    }
39
40
    /**
41
     * {@inheritdoc}
42
     */
43
    public function validate(AttributeValueInterface $attributeValue, ExecutionContextInterface $context, array $configuration) { }
44
}
45