Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
23 | public static function write($path, $content) |
||
24 | { |
||
25 | if (file_exists($path)) { |
||
26 | $old = file_get_contents($path); |
||
27 | if ($old === $content) { |
||
28 | return; |
||
29 | } |
||
30 | } |
||
31 | file_put_contents($path, $content); |
||
32 | Console::stdout(Console::ansiFormat("written file: $path\n", [Console::FG_YELLOW])); |
||
33 | } |
||
34 | } |
||
35 |