Completed
Push — master ( eb0e60...e48222 )
by Dmitry
02:26
created

Bootstrap   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 5 1
1
<?php
2
3
namespace hiqdev\assetpackagist;
4
5
use hiqdev\assetpackagist\repositories\PackageRepository;
6
use Yii;
7
use yii\base\Application;
8
use yii\base\BootstrapInterface;
9
10
class Bootstrap implements BootstrapInterface
11
{
12
    /**
13
     * Bootstrap method to be called during application bootstrap stage.
14
     * @param Application $app the application currently running
15
     */
16
    public function bootstrap($app)
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
17
    {
18
        Yii::$container->set('db', function () { return Yii::$app->get('db'); });
19
        Yii::$container->set(PackageRepository::class, PackageRepository::class, [\yii\di\Instance::of('db')]);
20
    }
21
}
22