Completed
Push — 6.0 ( c13f16...4fc9fc )
by liu
05:12
created

Log   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 9
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 9
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __make() 0 5 1
1
<?php
2
// +----------------------------------------------------------------------
3
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
4
// +----------------------------------------------------------------------
5
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
6
// +----------------------------------------------------------------------
7
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
8
// +----------------------------------------------------------------------
9
// | Author: liu21st <[email protected]>
10
// +----------------------------------------------------------------------
11
declare (strict_types = 1);
12
13
namespace think;
14
15
/**
16
 * 日志管理类
17
 */
18
class Log extends LogManager
19
{
20
    public static function __make(Config $config)
2 ignored issues
show
Coding Style introduced by
Missing doc comment for function __make()
Loading history...
Coding Style introduced by
Method name "Log::__make" is invalid; only PHP magic methods should be prefixed with a double underscore
Loading history...
Coding Style introduced by
Public method name "Log::__make" must not be prefixed with an underscore
Loading history...
21
    {
22
        $log = new static();
23
        $log->init($config->get('log'));
0 ignored issues
show
Bug introduced by
It seems like $config->get('log') can also be of type null; however, parameter $config of think\LogManager::init() does only seem to accept array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

23
        $log->init(/** @scrutinizer ignore-type */ $config->get('log'));
Loading history...
24
        return $log;
25
    }
26
}
27