Completed
Push — master ( efaa20...5ac5ec )
by max
02:29
created

FileSystem   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isWritable() 0 4 1
A put() 0 4 1
1
<?php
2
3
namespace T4web\Cron\Log;
4
5
class FileSystem
6
{
7
    /**
8
     * @param string $filename
9
     * @return bool
10
     */
11
    public function isWritable($filename)
12
    {
13
        return is_writable($filename);
14
    }
15
16
    /**
17
     * @param string $filename
18
     * @param string $message
19
     * @return int
20
     */
21
    public function put($filename, $message)
22
    {
23
        return file_put_contents($filename, $message, FILE_APPEND);
24
    }
25
}
26