File::put()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace PHPieces\Framework\Util;
4
5
class File
6
{
7
8
    public function exists($filename)
9
    {
10
        return file_exists($filename);
11
    }
12
13
    public function get($path)
14
    {
15
        return file_get_contents($path);
16
    }
17
18
    public function put($path, $contents)
19
    {
20
        $result = file_put_contents($path, $contents);
21
       
22
        return $result;
23
    }
24
    
25
    public function time($path)
26
    {
27
        return filemtime($path);
28
    }
29
}
30