Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function __construct($filePath) |
||
22 | { |
||
23 | $this->filePath = $filePath; |
||
24 | |||
25 | $this->file = new SplFileInfo($filePath); |
||
26 | |||
27 | if (! $this->file->getExtension()) { |
||
28 | throw ImportFileException::noExtension(); |
||
29 | } |
||
30 | |||
31 | if (! $this->file->isFile()) { |
||
32 | throw ImportFileException::notExist($filePath); |
||
33 | } |
||
34 | |||
35 | $this->fileHandle = $this->file->openFile(); |
||
36 | |||
37 | $this->validateSyntax(); |
||
38 | } |
||
39 | |||
47 |