:octocat: omit parentheses around "new" calls

This commit is contained in:
smiley
2026-03-17 19:05:34 +01:00
parent 3bfa0be1d5
commit 9a38501f5b
59 changed files with 95 additions and 95 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ header('Content-type: application/json');
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
echo (new QRCode($options))->render($data); // -> JSON string
echo new QRCode($options)->render($data); // -> JSON string
```
The associated [JSON schema](https://json-schema.org/specification) can be found over at GitHub: [`qrcode.schema.json`](https://github.com/chillerlan/php-qrcode/blob/main/src/Output/qrcode.schema.json)
@@ -28,7 +28,7 @@ The previous versions of `php-qrcode` (v5 and earlier) just dumped an array repr
which is equivalent to the following:
```php
$matrix = (new QRCode($options))->getQRMatrix(); // -> QRMatrix instance
$matrix = new QRCode($options)->getQRMatrix(); // -> QRMatrix instance
// retrieve the internal matrix as an array of booleans
$json = json_encode($matrix->getMatrix(true), $jsonFlags);