Skip to content

Commit dbd8d8a

Browse files
committed
Apply php-cs-fixer fixes to examples/ folder
1 parent 24940a1 commit dbd8d8a

File tree

6 files changed

+53
-35
lines changed

6 files changed

+53
-35
lines changed

Diff for: example/HtmlOutput/html-example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
$examplePath = __DIR__ . '/html-example.htm';
1919
file_put_contents($examplePath, $html);
2020

21-
print 'HTML example created here: ' . $examplePath;
21+
print 'HTML example created here: ' . $examplePath;

Diff for: example/TcPdfOutput/tcpdf-example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
$examplePath = __DIR__ . "/tcpdf_example.pdf";
2525
$tcPdf->Output($examplePath, 'F');
2626

27-
print "PDF example created here : ".$examplePath;
27+
print "PDF example created here : ".$examplePath;

Diff for: example/example.php

+14-9
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
'Rue du Lac 1268',
2525
'2501 Biel',
2626
'CH'
27-
));
27+
)
28+
);
2829

2930
$qrBill->setCreditorInformation(
3031
QrBill\DataGroup\Element\CreditorInformation::create(
3132
'CH4431999123000889012' // This is a special QR-IBAN. Classic IBANs will not be valid here.
32-
));
33+
)
34+
);
3335

3436
// Add debtor information
3537
// Who has to pay the invoice? This part is optional.
@@ -44,15 +46,17 @@
4446
'9400',
4547
'Rorschach',
4648
'CH'
47-
));
49+
)
50+
);
4851

4952
// Add payment amount information
5053
// What amount is to be paid?
5154
$qrBill->setPaymentAmountInformation(
5255
QrBill\DataGroup\Element\PaymentAmountInformation::create(
5356
'CHF',
5457
2500.25
55-
));
58+
)
59+
);
5660

5761
// Add payment reference
5862
// This is what you will need to identify incoming payments.
@@ -65,7 +69,8 @@
6569
QrBill\DataGroup\Element\PaymentReference::create(
6670
QrBill\DataGroup\Element\PaymentReference::TYPE_QR,
6771
$referenceNumber
68-
));
72+
)
73+
);
6974

7075
// Optionally, add some human-readable information about what the bill is for.
7176
$qrBill->setAdditionalInformation(
@@ -79,10 +84,10 @@
7984
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.png');
8085
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.svg');
8186
} catch (Exception $e) {
82-
foreach($qrBill->getViolations() as $violation) {
83-
print $violation->getMessage()."\n";
84-
}
85-
exit;
87+
foreach ($qrBill->getViolations() as $violation) {
88+
print $violation->getMessage()."\n";
89+
}
90+
exit;
8691
}
8792

8893
// Next: Output full payment parts, depending on the format you want to use:

Diff for: example/example_minimal.php

+13-9
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,30 @@
2020
'Rue du Lac 1268',
2121
'2501 Biel',
2222
'CH'
23-
));
23+
)
24+
);
2425

2526
$qrBill->setCreditorInformation(
2627
QrBill\DataGroup\Element\CreditorInformation::create(
2728
'CH9300762011623852957' // This is a classic iban. QR-IBANs will not be valid in this minmal setup.
28-
));
29+
)
30+
);
2931

3032
// Add payment amount information
3133
// The currency must be defined.
3234
$qrBill->setPaymentAmountInformation(
3335
QrBill\DataGroup\Element\PaymentAmountInformation::create(
3436
'CHF'
35-
));
37+
)
38+
);
3639

3740
// Add payment reference
3841
// Explicitly define that no reference number will be used by setting TYPE_NON.
3942
$qrBill->setPaymentReference(
4043
QrBill\DataGroup\Element\PaymentReference::create(
4144
QrBill\DataGroup\Element\PaymentReference::TYPE_NON
42-
));
45+
)
46+
);
4347

4448
// Time to output something!
4549
//
@@ -48,14 +52,14 @@
4852
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.png');
4953
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.svg');
5054
} catch (Exception $e) {
51-
foreach($qrBill->getViolations() as $violation) {
52-
print $violation->getMessage()."\n";
53-
}
54-
exit;
55+
foreach ($qrBill->getViolations() as $violation) {
56+
print $violation->getMessage()."\n";
57+
}
58+
exit;
5559
}
5660

5761
// Next: Output full payment parts, depending on the format you want to use:
5862
//
5963
// - FpdfOutput/fpdf-example.php
6064
// - HtmlOutput/html-example.php
61-
// - TcPdfOutput/tcpdf-example.php
65+
// - TcPdfOutput/tcpdf-example.php

Diff for: example/example_scor.php

+15-10
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
'Rue du Lac 1268',
1818
'2501 Biel',
1919
'CH'
20-
));
20+
)
21+
);
2122

2223
$qrBill->setCreditorInformation(
2324
QrBill\DataGroup\Element\CreditorInformation::create(
2425
'CH9300762011623852957' // With SCOR, this is a classic iban. QR-IBANs will not be valid here.
25-
));
26+
)
27+
);
2628

2729
// Add debtor information
2830
// Who has to pay the invoice? This part is optional.
@@ -37,23 +39,26 @@
3739
'9400',
3840
'Rorschach',
3941
'CH'
40-
));
42+
)
43+
);
4144

4245
// Add payment amount information
4346
// What amount is to be paid?
4447
$qrBill->setPaymentAmountInformation(
4548
QrBill\DataGroup\Element\PaymentAmountInformation::create(
4649
'CHF',
4750
2500.25
48-
));
51+
)
52+
);
4953

5054
// Add payment reference
5155
// This is what you will need to identify incoming payments.
5256
$qrBill->setPaymentReference(
5357
QrBill\DataGroup\Element\PaymentReference::create(
5458
QrBill\DataGroup\Element\PaymentReference::TYPE_SCOR,
5559
QrBill\Reference\RfCreditorReferenceGenerator::generate('I20200631')
56-
));
60+
)
61+
);
5762

5863
// Optionally, add some human-readable information about what the bill is for.
5964
$qrBill->setAdditionalInformation(
@@ -69,14 +74,14 @@
6974
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.png');
7075
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.svg');
7176
} catch (Exception $e) {
72-
foreach($qrBill->getViolations() as $violation) {
73-
print $violation->getMessage()."\n";
74-
}
75-
exit;
77+
foreach ($qrBill->getViolations() as $violation) {
78+
print $violation->getMessage()."\n";
79+
}
80+
exit;
7681
}
7782

7883
// Next: Output full payment parts, depending on the format you want to use:
7984
//
8085
// - FpdfOutput/fpdf-example.php
8186
// - HtmlOutput/html-example.php
82-
// - TcPdfOutput/tcpdf-example.php
87+
// - TcPdfOutput/tcpdf-example.php

Diff for: example/example_zero_amount.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@
2121
'Rue du Lac 1268',
2222
'2501 Biel',
2323
'CH'
24-
));
24+
)
25+
);
2526

2627
$qrBill->setCreditorInformation(
2728
QrBill\DataGroup\Element\CreditorInformation::create(
2829
'CH4431999123000889012' // This is a special QR-IBAN. Classic IBANs will not be valid here.
29-
));
30+
)
31+
);
3032

3133
// Add payment amount information of 0.00
3234
$qrBill->setPaymentAmountInformation(
3335
QrBill\DataGroup\Element\PaymentAmountInformation::create(
3436
'CHF',
3537
0.00
36-
));
38+
)
39+
);
3740

3841
// Add payment reference
3942
$referenceNumber = QrBill\Reference\QrPaymentReferenceGenerator::generate(
@@ -45,7 +48,8 @@
4548
QrBill\DataGroup\Element\PaymentReference::create(
4649
QrBill\DataGroup\Element\PaymentReference::TYPE_QR,
4750
$referenceNumber
48-
));
51+
)
52+
);
4953

5054
// Add do-not-use-for-payment information
5155
$qrBill->setAdditionalInformation(
@@ -59,7 +63,7 @@
5963
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.png');
6064
$qrBill->getQrCode()->writeFile(__DIR__ . '/qr.svg');
6165
} catch (Exception $e) {
62-
foreach($qrBill->getViolations() as $violation) {
66+
foreach ($qrBill->getViolations() as $violation) {
6367
print $violation->getMessage()."\n";
6468
}
6569
exit;

0 commit comments

Comments
 (0)