CustomHtmlEditorFieldToolbar   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateMediaForm() 0 4 1
1
<?php
2
3
namespace CWP\Core\Extension;
4
5
use SilverStripe\Core\Extension;
6
use SilverStripe\Forms\Form;
7
use SilverStripe\View\Requirements;
8
9
/**
10
 * @todo rename file to match class name
11
 * @todo investigate updated HTMLEditorField_Toolbar changes, and find new implementation
12
 */
13
class CustomHtmlEditorFieldToolbar extends Extension
14
{
15
16
    /**
17
     * @param Form $form
18
     * @return void
19
     */
20
    public function updateMediaForm(Form $form)
0 ignored issues
show
Unused Code introduced by
The parameter $form is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
    public function updateMediaForm(/** @scrutinizer ignore-unused */ Form $form)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22
        Requirements::add_i18n_javascript('cwp/cwp-core:javascript/lang');
0 ignored issues
show
Deprecated Code introduced by
The function SilverStripe\View\Requir...::add_i18n_javascript() has been deprecated. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

22
        /** @scrutinizer ignore-deprecated */ Requirements::add_i18n_javascript('cwp/cwp-core:javascript/lang');
Loading history...
23
        Requirements::javascript('cwp/cwp-core:javascript/CustomHtmlEditorFieldToolbar.js');
24
    }
25
}
26