Completed
Push — master ( cc0b93...2d7ca6 )
by wen
12:33
created

Tinymce   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getSize() 0 4 1
A setSize() 0 6 1
A getOptions() 0 4 1
A setOptions() 0 6 1
A toArray() 0 7 1
1
<?php
2
3
namespace Sco\Admin\Form\Elements;
4
5
class Tinymce extends NamedElement
6
{
7
    protected $type = 'tinymce';
8
9
    protected $size;
10
11
    protected $options;
12
13
    /**
14
     * @return mixed
15
     */
16
    public function getSize()
17
    {
18
        return $this->size;
19
    }
20
21
    /**
22
     * @param mixed $size
23
     *
24
     * @return Tinymce
25
     */
26
    public function setSize($size)
27
    {
28
        $this->size = $size;
29
30
        return $this;
31
    }
32
33
    /**
34
     * @return mixed
35
     */
36
    public function getOptions()
37
    {
38
        return $this->options;
39
    }
40
41
    /**
42
     * @param mixed $options
43
     *
44
     * @return Tinymce
45
     */
46
    public function setOptions($options)
47
    {
48
        $this->options = $options;
49
50
        return $this;
51
    }
52
53
    public function toArray()
54
    {
55
        return parent::toArray() + [
56
                'size'    => $this->getSize(),
57
                'options' => $this->getOptions(),
58
            ];
59
    }
60
}
61