Completed
Push — master ( da6f26...74726b )
by Andrii
04:01
created

Application::setDefinitions()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
crap 6
1
<?php
2
3
/*
4
 * HiPanel core package
5
 *
6
 * @link      https://hipanel.com/
7
 * @package   hipanel-core
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2014-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\base;
13
14
use Yii;
15
16
/**
17
 * Application.
18
 *
19
 * Redefined just to set DI definitions through config.
20
 */
21
class Application extends \yii\web\Application
22
{
23
    public $class;
24
25
    public function setDefinitions(array $definitions)
26
    {
27
        foreach ($definitions as $class => $definition) {
28
            Yii::$container->set($class, $definition);
29
        }
30
    }
31
}
32