Meta   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
A renderBox() 0 7 1
1
<?php
2
/**
3
 * @link http://www.writesdown.com/
4
 * @copyright Copyright (c) 2015 WritesDown
5
 * @license http://www.writesdown.com/license/
6
 */
7
8
namespace themes\writesdown\classes\meta;
9
10
use Yii;
11
use yii\base\Object;
12
13
/**
14
 * Class MetaBox
15
 *
16
 * @author Agiel K. Saputra <[email protected]>
17
 * @since 0.1.0
18
 */
19
class Meta extends Object
20
{
21
    /**
22
     * @var \common\models\Post
23
     */
24
    public $model;
25
26
    /**
27
     * @var \yii\widgets\ActiveForm
28
     */
29
    public $form;
30
31
    /**
32
     * @inheritdoc
33
     */
34
    public function init()
35
    {
36
        $this->renderBox();
37
    }
38
39
    public function renderBox()
40
    {
41
        echo Yii::$app->view->renderFile(__DIR__ . '/views/_form.php', [
42
            'model' => $this->model,
43
            'form'  => $this->form
44
        ]);
45
    }
46
}
47