Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
95 | public function get_config_json( $filename ) { |
||
96 | if ( isset( $this->loaded[ $filename ] ) ) { |
||
97 | return $this->loaded[ $filename ]; |
||
98 | } |
||
99 | |||
100 | $contents = file_get_contents( $this->path . 'config/' . $filename . '.json' ); |
||
101 | |||
102 | if ( false === $contents ) { |
||
103 | return null; |
||
104 | } |
||
105 | |||
106 | return $this->loaded[ $filename ] = json_decode( $contents, true ); |
||
107 | } |
||
108 | } |
||
109 |