StaticMap   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 5
Bugs 1 Features 0
Metric Value
c 5
b 1
f 0
dl 0
loc 14
wmc 1
lcom 1
cbo 3
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 7 1
1
<?php
2
/**
3
 * Codru Components
4
 *
5
 * @author Maxim Vasiliev <[email protected]>
6
 * @license http://www.opensource.org/licenses/bsd-license.php
7
 */
8
9
namespace codru\staticmap;
10
11
use Yii;
12
use yii\base\Widget;
13
use yii\base\Exception;
14
use yii\helpers\Html;
15
16
class StaticMap extends Widget
17
{
18
19
    public $imageOptions = [];
20
    public $map = [];
21
22
    public function run()
23
    {
24
        echo Html::img(
25
            Yii::createObject($this->map)->getMapUrl(),
26
            $this->imageOptions
27
        );
28
    }
29
}
30