Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class DocumentFactory |
||
9 | { |
||
10 | /** |
||
11 | * @param string $fileName |
||
12 | * @param string $filePath |
||
13 | * @return Document |
||
14 | */ |
||
15 | public static function makeFromPath(string $fileName, string $filePath): Document |
||
16 | { |
||
17 | return new Document($fileName, new LazyOpenStream($filePath, 'r')); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param string $fileName |
||
22 | * @param StreamInterface $fileStream |
||
23 | * @return Document |
||
24 | */ |
||
25 | public static function makeFromStream(string $fileName, StreamInterface $fileStream): Document |
||
28 | } |
||
29 | } |
||
30 |