Skip to content

Commit 9a38501

Browse files
committed
:octocat: omit parentheses around "new" calls
1 parent 3bfa0be commit 9a38501

59 files changed

Lines changed: 95 additions & 95 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/Built-In-Output/QREps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Render and save to file:
3636
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
3737
$file = __DIR__.'/qrcode.eps';
3838

39-
(new QRCode($options))->render($data, $file);
39+
new QRCode($options)->render($data, $file);
4040
```
4141

4242

@@ -46,7 +46,7 @@ Push as file download in a browser:
4646
header('Content-type: application/postscript');
4747
header('Content-Disposition: filename="qrcode.eps"');
4848

49-
echo (new QRCode($options))->render($data);
49+
echo new QRCode($options)->render($data);
5050

5151
exit;
5252
```

docs/Built-In-Output/QRFpdf.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Render the output:
3434

3535
```php
3636
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
37-
$out = (new QRCode($options))->render($data); // -> data:application/pdf;base64,...
37+
$out = new QRCode($options)->render($data); // -> data:application/pdf;base64,...
3838

3939
echo $out;
4040
```
@@ -46,7 +46,7 @@ Return the `FPDF` instance (will ignore other output options):
4646
$options->returnResource = true;
4747

4848
/** @var \FPDF $fpdf */
49-
$fpdf = (new QRCode($options))->render($data);
49+
$fpdf = new QRCode($options)->render($data);
5050

5151
// do stuff with the FPDF instance...
5252

docs/Built-In-Output/QRGdImage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Render the output:
4646

4747
```php
4848
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
49-
$out = (new QRCode($options))->render($data); // -> data:image/webp;base64,...
49+
$out = new QRCode($options)->render($data); // -> data:image/webp;base64,...
5050

5151
printf('<img alt="%s" src="%s" />', $alt, $out);
5252
```
@@ -58,7 +58,7 @@ Return the `GdImage` instance (will ignore other output options):
5858
$options->returnResource = true;
5959

6060
/** @var \GdImage $gdImage */
61-
$gdImage = (new QRCode($options))->render($data);
61+
$gdImage = new QRCode($options)->render($data);
6262

6363
// do stuff with the GdImage instance...
6464
$size = imagesx($gdImage);

docs/Built-In-Output/QRImagick.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Render the output:
4949

5050
```php
5151
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
52-
$out = (new QRCode($options))->render($data); // -> data:image/webp;base64,...
52+
$out = new QRCode($options)->render($data); // -> data:image/webp;base64,...
5353

5454
printf('<img alt="%s" src="%s" />', $alt, $out);
5555
```
@@ -61,7 +61,7 @@ Return the `Imagick` instance (will ignore other output options):
6161
$options->returnResource = true;
6262

6363
/** @var \Imagick $imagick */
64-
$imagick = (new QRCode($options))->render($data);
64+
$imagick = new QRCode($options)->render($data);
6565

6666
// do stuff with the Imagick instance...
6767
$imagick->scaleImage(150, 150, true);

docs/Built-In-Output/QRInterventionImage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Render the output:
4444

4545
```php
4646
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
47-
$out = (new QRCode($options))->render($data); // -> data:image/png;base64,...
47+
$out = new QRCode($options)->render($data); // -> data:image/png;base64,...
4848

4949
printf('<img alt="%s" src="%s" />', $alt, $out);
5050
```
@@ -56,7 +56,7 @@ Return the `ImageInterface` instance (will ignore other output options):
5656
$options->returnResource = true;
5757

5858
/** @var \Intervention\Image\Interfaces\ImageInterface $image */
59-
$image = (new QRCode($options))->render($data);
59+
$image = new QRCode($options)->render($data);
6060

6161
// do stuff with the ImageInterface instance...
6262

docs/Built-In-Output/QRMarkupHTML.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Output in a HTML document (via PHP):
3434
<?php
3535

3636
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
37-
$out = (new QRCode($options))->render($data);
37+
$out = new QRCode($options)->render($data);
3838

3939
header('Content-type: text/html');
4040

docs/Built-In-Output/QRMarkupSVG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Render the output:
5353
5454
```php
5555
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
56-
$out = (new QRCode($options))->render($data); // -> data:image/svg+xml;base64,PD94bWwgdmVyc2...
56+
$out = new QRCode($options)->render($data); // -> data:image/svg+xml;base64,PD94bWwgdmVyc2...
5757
5858
printf('<img alt="%s" src="%s" />', $alt, $out);
5959
```

docs/Built-In-Output/QRMarkupXML.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Render the output:
7878

7979
```php
8080
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
81-
$out = (new QRCode($options))->render($data); // -> XML, rendered as SVG
81+
$out = new QRCode($options)->render($data); // -> XML, rendered as SVG
8282

8383
header('Content-type: application/xml');
8484

docs/Built-In-Output/QRStringJSON.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ header('Content-type: application/json');
1616

1717
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
1818

19-
echo (new QRCode($options))->render($data); // -> JSON string
19+
echo new QRCode($options)->render($data); // -> JSON string
2020
```
2121

2222
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
2828
which is equivalent to the following:
2929

3030
```php
31-
$matrix = (new QRCode($options))->getQRMatrix(); // -> QRMatrix instance
31+
$matrix = new QRCode($options)->getQRMatrix(); // -> QRMatrix instance
3232

3333
// retrieve the internal matrix as an array of booleans
3434
$json = json_encode($matrix->getMatrix(true), $jsonFlags);

docs/Built-In-Output/QRStringText.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Output:
3434

3535
```php
3636
$data = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
37-
$qrcode = (new QRCode($options))->render($data);
37+
$qrcode = new QRCode($options)->render($data);
3838

3939
echo "\n\n$qrcode\n\n";
4040
```

0 commit comments

Comments
 (0)