HelpWidget   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 2
1
<?php
2
/**
3
 * @property string $title
4
 * @property string $topic
5
 */
6
class HelpWidget extends CWidget
7
{
8
    public $title = '';
9
    public $topic = '';
10
11
    public function run()
12
    {
13
        $help = new Help;
14
        $help->setTopic($this->topic);
15
        $item = $help->getRandomItemByType();
16
        if ($item) {
17
            echo '<p class="spr help"><strong>tipp:</strong><br/>' . $item . '</p>';
18
        }
19
    }
20
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
21