Filesystem   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isWritable() 0 4 1
A isDir() 0 4 1
A put() 0 4 1
1
<?php
2
3
namespace T4web\Filesystem;
4
5
use Symfony\Component\Filesystem\Filesystem as BaseFilesystem;
6
7
class Filesystem extends BaseFilesystem
8
{
9
    /**
10
     * @param string $filename
11
     * @return bool
12
     */
13
    public function isWritable($filename)
14
    {
15
        return is_writable($filename);
16
    }
17
18
    /**
19
     * @param string $filename
20
     * @return bool
21
     */
22
    public function isDir($filename)
23
    {
24
        return is_dir($filename);
25
    }
26
27
    /**
28
     * @param string $filename
29
     * @param string $data
30
     * @param int $flags
31
     * @return int
32
     */
33
    public function put($filename, $data, $flags = FILE_APPEND)
34
    {
35
        return file_put_contents($filename, $data, $flags);
36
    }
37
}
38