Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public static function makeFromString(string $fileName, string $string): Document |
||
29 | { |
||
30 | $fileStream = fopen('php://memory', 'rb+'); |
||
31 | if ($fileStream === false) { |
||
32 | throw FilesystemException::createFromPhpError(); |
||
33 | } |
||
34 | |||
35 | if (fwrite($fileStream, $string) === false) { |
||
36 | throw FilesystemException::createFromPhpError(); |
||
37 | } |
||
38 | |||
39 | return new Document($fileName, stream_for($fileStream)); |
||
|
|||
40 | } |
||
42 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.