Shows   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 6 6 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 namespace CosmicRadioTV\Podcast\Controllers;
2
3
use BackendMenu;
4
use BackendAuth;
5
use Backend\Classes\Controller;
6
use CosmicRadioTV\Podcast\Models\Show;
7
8
/**
9
 * Shows Back-end Controller
10
 */
11 View Code Duplication
class Shows extends Controller
12
{
13
    public $implement = [
14
        'Backend.Behaviors.FormController',
15
        'Backend.Behaviors.ListController'
16
    ];
17
18
    public $formConfig = 'config_form.yaml';
19
    public $listConfig = 'config_list.yaml';
20
21
    public $requiredPermissions = ['cosmicradiotv.podcast.access_show*'];
22
23
    public function __construct()
24
    {
25
        parent::__construct();
26
27
        BackendMenu::setContext('CosmicRadioTV.Podcast', 'podcast', 'shows');
28
    }
29
}