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

FieldTypeCKEditor::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 10
Ratio 83.33 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 10
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
3
namespace Itstructure\FieldWidgets;
4
5
use Itstructure\CKEditor\CKEditor;
6
7
/**
8
 * Class FieldTypeCKEditor
9
 * Class for printing a CKEditor.
10
 *
11
 * @package Itstructure\FieldWidgets
12
 */
13 View Code Duplication
class FieldTypeCKEditor extends FieldType
0 ignored issues
show
Duplication introduced by
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
            ->widget(
22
                CKEditor::class,
23
                [
24
                    'preset' => $this->preset,
25
                    'clientOptions' => $this->getOptions()
26
                ]
27
            )
28
            ->label($this->getLabel());
29
    }
30
}
31