Completed
Push — master ( 82acc4...deba42 )
by Will
13s
created

UserDefinedForm::getCMSFields()   D

Complexity

Conditions 9
Paths 2

Size

Total Lines 158
Code Lines 98

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 158
rs 4.8196
c 0
b 0
f 0
cc 9
eloc 98
nc 2
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace SilverStripe\UserForms\Model;
4
5
use Page;
6
7
use SilverStripe\UserForms\UserForm;
8
9
/**
10
 * @package userforms
11
 */
12
class UserDefinedForm extends Page
13
{
14
    use UserForm;
15
16
    /**
17
     * @var string
18
     */
19
    private static $icon = 'userforms/client/dist/images/sitetree_icon.png';
0 ignored issues
show
Unused Code introduced by
The property $icon is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
20
21
    /**
22
     * @var string
23
     */
24
    private static $description = 'Adds a customizable form.';
0 ignored issues
show
Unused Code introduced by
The property $description is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
25
26
    /**
27
     * @var string
28
     */
29
    private static $table_name = 'UserDefinedForm';
0 ignored issues
show
Unused Code introduced by
The property $table_name is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
30
}
31