BadgeComponent   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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getModel() 0 4 1
A init() 0 5 1
1
<?php
2
/**
3
 * @property BadgeActivator $model
4
 */
5
class BadgeComponent extends CApplicationComponent
6
{
7
    private $model;
8
    
9
    public function getModel()
10
    {
11
        return $this->model;
12
    }
13
14
    public function init()
15
    {
16
        $this->model = new CommonBadgeActivator();
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
17
        $this->model->uid = Yii::app()->player->uid;
18
    }
19
}
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...
20