Completed
Push — master ( d5bce1...bd6130 )
by Klochok
02:22
created

CartTeaser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 16
ccs 0
cts 12
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
A getModule() 0 4 1
1
<?php
2
3
/*
4
 * Cart module for Yii2
5
 *
6
 * @link      https://github.com/hiqdev/yii2-cart
7
 * @package   yii2-cart
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\yii2\cart\widgets;
13
14
use hiqdev\yii2\cart\Module;
15
16
class CartTeaser extends \yii\base\Widget
17
{
18
    public function run()
19
    {
20
        return $this->render('CartTeaser', [
21
            'widget' => $this,
22
            'view'   => $this->getView(),
23
            'cart'   => $this->getModule()->getCart(),
24
        ]);
25
    }
26
27
    public function getModule()
28
    {
29
        return Module::getInstance();
30
    }
31
}
32