Bootstrap   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 13
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 8 2
1
<?php
2
/**
3
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 * you may not use this file except in compliance with the License.
5
 * You may obtain a copy of the License at
6
 *
7
 * @license http://www.apache.org/licenses/LICENSE-2.0
8
 *
9
 * Unless required by applicable law or agreed to in writing, software
10
 * distributed under the License is distributed on an "AS IS" BASIS,
11
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 * See the License for the specific language governing permissions and
13
 * limitations under the License.
14
 *
15
 * @author Alexander Zakharov <[email protected]>
16
 * @link http://rootlocal.ru
17
 * @copyright Copyright © 2018 rootlocal.ru
18
 */
19
20
namespace image;
21
22
use yii\base\BootstrapInterface;
23
24
/**
25
 * Class Bootstrap
26
 * @package image
27
 */
28
class Bootstrap implements BootstrapInterface
29
{
30
    /**
31
     * @inheritdoc
32
     */
33
    public function bootstrap($app)
34
    {
35
        // add module I18N category
36
        if (!isset($app->i18n->translations['image'])) {
37
            $app->i18n->translations['image'] = [
38
                'class' => 'yii\i18n\PhpMessageSource',
39
                'sourceLanguage' => 'en-US',
40
                'basePath' => '@image/messages',
41
            ];
42
        }
43
    }
44
}