Completed
Push — master ( 6c0568...dd7294 )
by Robbie
13s
created

code/ContentWidget.php (3 issues)

overwriting of private properties.

Comprehensibility Informational

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
/**
4
 * Content Widget
5
 *
6
 * @package silverstripe-content-widget
7
 */
8
class ContentWidget extends Widget
9
{
10
    /**
11
     * @var array
12
     */
13
    public static $db = array(
14
        "HTML" => "HTMLText"
15
    );
16
17
    /**
18
     * @var string
19
     */
20
    private static $title = "HTML Content";
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
21
22
    /**
23
     * @var string
24
     */
25
    private static $cmsTitle = "HTML Content";
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
26
27
    /**
28
     * @var string
29
     */
30
    private static $description = "Custom HTML content widget.";
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
31
32
    /**
33
     * @return FieldList
34
     */
35
    public function getCMSFields()
36
    {
37
        $fields = parent::getCMSFields();
38
39
        $fields->push(TextField::create("Title"));
40
        $fields->push(HtmlEditorField::create("HTML", "Content"));
41
42
        return $fields;
43
    }
44
}
45