TextArea   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 26
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setValue() 0 8 2
1
<?php
2
3
/**
4
 * This file is part of slick/form package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Form\Input;
11
12
use Slick\Form\InputInterface;
13
use Slick\Form\Renderer\TextArea as AreaRenderer;
14
15
/**
16
 * Text Area input
17
 *
18
 * @package Slick\Form\Input
19
 * @author  Filipe Silva <[email protected]>
20
 */
21
class TextArea extends AbstractInput implements InputInterface
22
{
23
24
    /**
25
     * @var string Renderer class
26
     */
27
    protected $rendererClass = AreaRenderer::class;
28
29
    /**
30
     * Adds the value to the select
31
     *
32
     * Mainly it removes the entry in the attributes list
33
     *
34
     * @param mixed $value
35
     *
36
     * @return $this|self|Select
37
     */
38 4
    public function setValue($value)
39
    {
40 4
        parent::setValue($value);
41 4
        if ($this->hasAttribute('value')) {
42
            $this->getAttributes()->remove('value');
43
        }
44 4
        return $this;
45
    }
46
}