Skip to content

Commit c4ed672

Browse files
committed
:octocat: fix the broken PHPCS config
1 parent beecbe7 commit c4ed672

28 files changed

+171
-147
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@
6868
}
6969
},
7070
"scripts": {
71-
"phpunit": "@php vendor/bin/phpunit",
72-
"phan": "@php vendor/bin/phan"
71+
"phan": "@php vendor/bin/phan",
72+
"phpcs": "@php vendor/bin/phpcs",
73+
"phpunit": "@php vendor/bin/phpunit"
7374
},
7475
"config": {
7576
"lock": false,

examples/eps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ', __DIR__.'/qrcode.eps');
5757

58-
if(php_sapi_name() !== 'cli'){
58+
if(PHP_SAPI !== 'cli'){
5959
// if viewed in the browser, we should push it as file download as EPS isn't usually supported
6060
header('Content-type: application/postscript');
6161
header('Content-Disposition: filename="qrcode.eps"');

examples/fpdf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use chillerlan\QRCode\Data\QRMatrix;
1212
use chillerlan\QRCode\Output\QROutputInterface;
1313

14-
require_once __DIR__ . '/../vendor/autoload.php';
14+
require_once __DIR__.'/../vendor/autoload.php';
1515

1616
$options = new QROptions;
1717

@@ -53,7 +53,7 @@
5353

5454
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
5555

56-
if(php_sapi_name() !== 'cli'){
56+
if(PHP_SAPI !== 'cli'){
5757
header('Content-type: application/pdf');
5858
}
5959

examples/imageWithRoundedShapes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use chillerlan\QRCode\QROptions;
2222
use chillerlan\Settings\SettingsContainerInterface;
2323

24-
require_once __DIR__ . '/../vendor/autoload.php';
24+
require_once __DIR__.'/../vendor/autoload.php';
2525

2626
// --------------------
2727
// Class definition

examples/imagickWithLogo.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class ImagickWithLogoOptions extends QROptions{
7575
*
7676
* of course, we could accept other formats too.
7777
* we're not checking for the file type either for simplicity reasons (assuming PNG)
78+
*
79+
* @throws \chillerlan\QRCode\QRCodeException
7880
*/
7981
protected function set_pngLogo(string $pngLogo):void{
8082

examples/svg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
}
6161

6262

63-
if(php_sapi_name() !== 'cli'){
63+
if(PHP_SAPI !== 'cli'){
6464
header('Content-type: image/svg+xml');
6565

6666
if(extension_loaded('zlib')){

examples/svgMeltedModules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ protected function set_meltRadius(float $meltRadius):void{
286286
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
287287

288288

289-
if(php_sapi_name() !== 'cli'){
289+
if(PHP_SAPI !== 'cli'){
290290
header('Content-type: image/svg+xml');
291291

292292
if(extension_loaded('zlib')){

examples/svgRandomColoredDots.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class RandomDotsOptions extends QROptions{
155155

156156

157157
// dump the output
158-
if(php_sapi_name() !== 'cli'){
158+
if(PHP_SAPI !== 'cli'){
159159
header('content-type: image/svg+xml');
160160
}
161161

examples/svgRoundQuietzone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ protected function set_svgLogoScale(float $svgLogoScale):void{
349349
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
350350

351351

352-
if(php_sapi_name() !== 'cli'){
352+
if(PHP_SAPI !== 'cli'){
353353
header('Content-type: image/svg+xml');
354354

355355
if(extension_loaded('zlib')){

examples/svgWithLogo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected function set_svgLogoScale(float $svgLogoScale):void{
143143
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
144144

145145

146-
if(php_sapi_name() !== 'cli'){
146+
if(PHP_SAPI !== 'cli'){
147147
header('Content-type: image/svg+xml');
148148

149149
if(extension_loaded('zlib')){

0 commit comments

Comments
 (0)