mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-07 20:37:15 +00:00
:octocat: omit parentheses around "new" calls
This commit is contained in:
@@ -71,7 +71,7 @@ class SVGConvert extends QRMarkupSVG{
|
||||
|
||||
if($base64){
|
||||
// use finfo to guess the mime type
|
||||
$mime = (new finfo(FILEINFO_MIME_TYPE))->buffer($imageData);
|
||||
$mime = new finfo(FILEINFO_MIME_TYPE)->buffer($imageData);
|
||||
|
||||
if($mime === false){
|
||||
throw new QRCodeOutputException('unable to detect mime type');
|
||||
@@ -121,7 +121,7 @@ $options->svgDefs = '
|
||||
|
||||
|
||||
// render the SVG and convert to the desired ImageMagick format
|
||||
$image = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
|
||||
$image = new QRCode($options)->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
|
||||
|
||||
header('Content-type: image/png');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user