FileLoader   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A save() 0 11 4
1
<?php namespace jlourenco\support\Helpers;
2
3
class FileLoader extends \Illuminate\Config\FileLoader
4
{
5
6
    public function save($items, $environment, $group, $namespace = null)
7
    {
8
        $path = $this->getPath($namespace);
9
10
        if (is_null($path))
11
            return;
12
13
        $file = (!$environment || ($environment == 'production')) ? "{$path}/{$group}.php" : "{$path}/{$environment}/{$group}.php";
14
15
        $this->files->put($file, '<?php return ' . var_export($items, true) . ';');
16
    }
17
18
}