Skip to content

Commit

Permalink
Merge branch 'open-source-contributions-improve_examples'
Browse files Browse the repository at this point in the history
Accepting PR #107 as it is a non-impacting change to the codebase. Many thanks to @peter279 for his time creating this pull request. 👏
  • Loading branch information
DragonBe committed May 27, 2020
2 parents b61ecd4 + 557beeb commit ab0ae5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/async_processing/worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$validationStmt = $pdo->prepare('SELECT `id`, `vat_id` FROM `vat_validation` WHERE `validated` = "" ORDER BY `id` DESC LIMIT 1');
$updateVatId = $pdo->prepare('UPDATE `vat_validation` SET `validated` = ?, `result` = ?, `reason` = ?, `name` = ?, `address` = ?, `identifier` = ? WHERE `id` = ?');

function debug($message = '')
function debug($message = ''): void
{
$debug = false;
if ($debug) {
Expand Down Expand Up @@ -41,7 +41,7 @@ function debug($message = '')
$vatNumber = substr($vatin, 2);
$vatNumber = $vies->filterVat($vatNumber);
$reason = '';

try {
$result = $vies->validateVat($vatCountry, $vatNumber);
debug('Result: ' . var_export($result, 1));
Expand All @@ -65,5 +65,5 @@ function debug($message = '')
$updateVatId->bindValue(7, $id);

$updateVatId->execute();

} while (true);
2 changes: 1 addition & 1 deletion examples/checkVatBatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
*
* @return array
*/
function vatinProvider()
function vatinProvider(): array
{
$filename = realpath(__DIR__ . '/vatins.php');

Expand Down

0 comments on commit ab0ae5c

Please sign in to comment.