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