| Total Complexity | 8 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 72.72% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class File |
||
| 6 | { |
||
| 7 | private $fname; |
||
| 8 | private $file; |
||
| 9 | |||
| 10 | 2 | public function __construct(string $fname = null) |
|
| 13 | 2 | } |
|
| 14 | |||
| 15 | /** |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | public function exists(): bool |
||
| 19 | { |
||
| 20 | if (file_exists($this->fname)) |
||
| 21 | return true; |
||
| 22 | |||
| 23 | return false; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return bool|resource |
||
| 28 | */ |
||
| 29 | public function open() |
||
| 32 | } |
||
| 33 | |||
| 34 | 2 | public function create() |
|
| 35 | { |
||
| 36 | 2 | return $this->file = fopen($this->fname, 'w+'); |
|
| 37 | } |
||
| 38 | |||
| 39 | 2 | public function write(string $content): void |
|
| 43 | 2 | } |
|
| 44 | |||
| 45 | 2 | public function read(array $data): string |
|
| 54 | } |
||
| 55 | |||
| 56 | 2 | public function close(): void |
|
| 61 |