DataFile::write()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: InkoHX
5
 * Date: 2018/08/03
6
 * Time: 8:48
7
 */
8
9
namespace SkinData;
10
11
12
class DataFile
13
{
14
    private $path;
15
16
    public function __construct(string $file)
17
    {
18
        $this->path = Main::$path . '/' . $file . '/';
19
        if(!file_exists($this->path)){
20
            mkdir($this->path, 0755, true);
21
        }
22
    }
23
24
    public function write(string $file, string $data) {
25
        file_put_contents($this->path.$file, $data, 9);
26
    }
27
}