Completed
Push — master ( d015d4...c50906 )
by Mikołaj
02:42
created

EditorView   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 100 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 28
loc 28
rs 10
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A editor() 11 11 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Rudolf\Modules\Appearance\Editor;
4
5
use Rudolf\Framework\View\AdminView;
6
7 View Code Duplication
class EditorView extends AdminView
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...
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $filesList;
13
14
    /**
15
     * @var array
16
     */
17
    protected $file;
18
19
    /**
20
     * @param array $filesList
21
     * @param array $file
22
     */
23
    public function editor(array $filesList, array $file)
24
    {
25
        $this->pageTitle = _('Theme editor');
26
        $this->head->setTitle($this->pageTitle);
27
28
        $this->filesList = $filesList;
29
30
        $this->file = $file;
31
32
        $this->template = 'appearance-editor';
33
    }
34
}
35