File   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A exists() 0 4 1
A get() 0 4 1
A put() 0 6 1
A time() 0 4 1
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