| 1 | <?php |
||
| 9 | class TextFileReader implements FileReaderInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $path; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * TextFileReader constructor. |
||
| 18 | * @param string $path |
||
| 19 | */ |
||
| 20 | 1 | public function __construct(string $path) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritDoc |
||
| 27 | */ |
||
| 28 | 4 | public function readFile():FileInterface |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 1 | public function getPath():string |
|
| 45 | |||
| 46 | 4 | private function valid(string $path) |
|
| 52 | |||
| 53 | 4 | private function validatePath(string $path) |
|
| 59 | |||
| 60 | 2 | private function validateType(string $path) |
|
| 66 | |||
| 67 | 2 | private function validateReadable(string $path) |
|
| 73 | } |
||
| 74 |