| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public static function fromString(string $fileName, string $mimeType, string $content): UploadedFile |
||
| 14 | { |
||
| 15 | /*$handle = tmpfile(); |
||
| 16 | fwrite($handle, $content); |
||
| 17 | $meta = stream_get_meta_data($handle);*/ |
||
| 18 | |||
| 19 | $tmpFilename = tempnam(sys_get_temp_dir(), 'resource_file_'); |
||
| 20 | file_put_contents($tmpFilename, $content); |
||
| 21 | |||
| 22 | return new UploadedFile($tmpFilename, $fileName, $mimeType, null, true); |
||
| 23 | } |
||
| 25 |