Completed
Push β€” master ( c71ed5...0719f8 )
by kill
09:59
created

conf   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 6 2
1
<?php
2
/**
3
 * Created by IntelliJ IDEA.
4
 * User: rozbo
5
 * Date: 2017/2/27
6
 * Time: δΈ‹εˆ2:57
7
 */
8
9
namespace puck;
10
use Noodlehaus\Config;
11
12
class conf {
13
    static $config=false;
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $config.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
14
    static public function load(){
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
15
        if(!self::$config){
16
            self::$config=Config::load(BASE_PATH.'/app/conf');
0 ignored issues
show
Documentation Bug introduced by
It seems like \Noodlehaus\Config::load(BASE_PATH . '/app/conf') of type object<Noodlehaus\Config> is incompatible with the declared type boolean of property $config.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
17
        }
18
        return self::$config;
19
    }
20
}