ObjLabelWidget   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 7 1
1
<?php
2
/**
3
 * HiPanel core package
4
 *
5
 * @link      https://hipanel.com/
6
 * @package   hipanel-core
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\widgets\obj;
12
13
use hipanel\models\Obj;
14
use hipanel\widgets\Label;
15
16
class ObjLabelWidget extends Label
17
{
18
    /**
19
     * @var Obj
20
     */
21
    public $model;
22
23
    public function init()
24
    {
25
        $objClass = $this->model->getObjClass();
26
        $this->setColor($objClass->getColor());
27
        $this->setLabel($objClass->getLabel());
28
        parent::init();
29
    }
30
}
31