Completed
Push — master ( ffee62...1450e2 )
by Andrey
03:08
created

Config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A get() 0 3 1
1
<?php
2
namespace humanity;
3
4
class Config {
5
6
    public static $config = [];
7
8
    public function __construct($config=[]){
9
        self::$config = array_merge(self::$config,$config);
10
    }    
11
12
    public function get(){
13
        return self::$config;
14
    }
15
16
}
17
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
18