DataFile   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A write() 0 3 1
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
}