System   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A writeFile() 0 9 2
1
<?php
2
3
namespace RoundingWell\Schematic;
4
5
/**
6
 * @codeCoverageIgnore
7
 */
8
class System
9
{
10
    public function writeFile($file, $contents)
11
    {
12
        $directory = pathinfo($file, PATHINFO_DIRNAME);
13
14
        if (!file_exists($directory)) {
15
            mkdir($directory, 0755, true);
16
        }
17
18
        return (int) file_put_contents($file, $contents);
19
    }
20
}
21