Completed
Push — master ( 4e2c55...2c21d8 )
by Andrey
01:28
created

src/FieldTypeTextArea.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Itstructure\FieldWidgets;
4
5
use yii\helpers\{ArrayHelper, Html};
6
7
/**
8
 * Class FieldTypeTextArea
9
 * Class for printing a text block of a form.
10
 *
11
 * @package Itstructure\FieldWidgets
12
 */
13 View Code Duplication
class FieldTypeTextArea extends FieldType
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    /**
16
     * @return string
17
     */
18
    public function run(): string
19
    {
20
        return $this->getField()
21
            ->textarea(
22
                ArrayHelper::merge(
23
                    [
24
                        'rows' => 10,
25
                        'cols' => 80
26
                    ],
27
                    $this->getOptions()
28
                )
29
            )
30
            ->label($this->getLabel());
31
    }
32
}
33