1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-25 14:50:48 +02:00

Wrap code line

This commit is contained in:
Oliver Vogel
2022-05-22 18:50:14 +02:00
parent 58585c81f3
commit f3b4092fac

View File

@@ -11,7 +11,9 @@ trait CanDecodeDataUri
*/
protected function decodeDataUri($value): object
{
$pattern = "/^data:(?P<mediatype>\w+\/[-+.\w]+)?(?P<parameters>(;[-\w]+=[-\w]+)*)(?P<base64>;base64)?,(?P<data>.*)/";
$pattern = "/^data:(?P<mediatype>\w+\/[-+.\w]+)?" .
"(?P<parameters>(;[-\w]+=[-\w]+)*)(?P<base64>;base64)?,(?P<data>.*)/";
$result = preg_match($pattern, $value, $matches);
return new class ($matches, $result)