| Total Complexity | 13 | 
| Total Lines | 136 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 5 | class File | ||
| 6 | { | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @param string $filename | ||
| 10 | * @param mixed $contents | ||
| 11 | * | ||
| 12 | * @return bool|int | ||
| 13 | */ | ||
| 14 | 2 | public static function put($filename, $contents) | |
| 15 |     { | ||
| 16 | 2 | return \file_put_contents($filename, $contents); | |
| 17 | } | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @param string $source | ||
| 21 | * @param string $mode | ||
| 22 | * | ||
| 23 | * @return bool|resource | ||
| 24 | */ | ||
| 25 | 5 | public static function open($source, $mode = 'r') | |
| 26 |     { | ||
| 27 | 5 | return @\fopen($source, $mode . 'b'); | |
| 28 | } | ||
| 29 | |||
| 30 | /** | ||
| 31 | * @param resource $handle | ||
| 32 | * | ||
| 33 | * @return bool | ||
| 34 | */ | ||
| 35 | 2 | public static function close($handle) | |
| 36 |     { | ||
| 37 | 2 | return \fclose($handle); | |
| 38 | } | ||
| 39 | |||
| 40 | /** | ||
| 41 | * @param string $path | ||
| 42 | * @param int $time | ||
| 43 | * @param int $accessTime | ||
| 44 | * | ||
| 45 | * @return bool | ||
| 46 | */ | ||
| 47 | 2 | public static function touch($path, $time = null, $accessTime = null) | |
| 48 |     { | ||
| 49 | 2 | return @\touch($path, $time, $accessTime); | |
| 50 | } | ||
| 51 | |||
| 52 | /** | ||
| 53 | * @param string $path | ||
| 54 | * | ||
| 55 | * @return bool|string | ||
| 56 | */ | ||
| 57 | 3 | public static function real($path) | |
| 60 | } | ||
| 61 | |||
| 62 | /** | ||
| 63 | * @param string $path | ||
| 64 | * | ||
| 65 | * @return bool | ||
| 66 | */ | ||
| 67 | 2 | public static function remove($path) | |
| 68 |     { | ||
| 69 | 2 | return \unlink($path); | |
| 70 | } | ||
| 71 | |||
| 72 | /** | ||
| 73 | * @param string $path | ||
| 74 | * | ||
| 75 | * @return int | ||
| 76 | */ | ||
| 77 | 1 | public static function size($path) | |
| 78 |     { | ||
| 79 | 1 | return \filesize($path); | |
| 80 | } | ||
| 81 | |||
| 82 | /** | ||
| 83 | * @param string $path | ||
| 84 | * | ||
| 85 | * @return bool | ||
| 86 | */ | ||
| 87 | 1 | public static function exists($path) | |
| 88 |     { | ||
| 89 | 1 | return \file_exists($path); | |
| 90 | } | ||
| 91 | |||
| 92 | /** | ||
| 93 | * @param string $path | ||
| 94 | * | ||
| 95 | * @return bool | ||
| 96 | */ | ||
| 97 | 1 | public static function isWritable($path) | |
| 98 |     { | ||
| 99 | 1 | return \is_writable($path); | |
| 100 | } | ||
| 101 | |||
| 102 | /** | ||
| 103 | * @param string $path | ||
| 104 | * | ||
| 105 | * @return bool | ||
| 106 | */ | ||
| 107 | 1 | public static function isReadable($path) | |
| 108 |     { | ||
| 109 | 1 | return \is_readable($path); | |
| 110 | } | ||
| 111 | |||
| 112 | /** | ||
| 113 | * @param string $path | ||
| 114 | * | ||
| 115 | * @return bool | ||
| 116 | */ | ||
| 117 | 1 | public static function isFile($path) | |
| 120 | } | ||
| 121 | |||
| 122 | /** | ||
| 123 | * @param string $path | ||
| 124 | * | ||
| 125 | * @return bool | ||
| 126 | */ | ||
| 127 | 1 | public static function isLink($path) | |
| 128 |     { | ||
| 130 | } | ||
| 131 | |||
| 132 | /** | ||
| 133 | * @param string $path | ||
| 134 | * @param string $link | ||
| 135 | * | ||
| 136 | * @return bool | ||
| 137 | */ | ||
| 138 | 1 | public static function symlink($path, $link) | |
| 144 |