| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class DocumentFactory |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param string $fileName |
||
| 16 | * @param string $filePath |
||
| 17 | * @return Document |
||
| 18 | */ |
||
| 19 | public static function makeFromPath(string $fileName, string $filePath): Document |
||
| 20 | { |
||
| 21 | return new Document($fileName, new LazyOpenStream($filePath, 'r')); |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $fileName |
||
| 26 | * @param StreamInterface $fileStream |
||
| 27 | * @return Document |
||
| 28 | */ |
||
| 29 | public static function makeFromStream(string $fileName, StreamInterface $fileStream): Document |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $fileName |
||
| 36 | * @param string $string |
||
| 37 | * @return Document |
||
| 38 | * @throws FilesystemException |
||
| 39 | */ |
||
| 40 | public static function makeFromString(string $fileName, string $string): Document |
||
| 46 | } |
||
| 47 | } |
||
| 48 |