Skip to content

Instantly share code, notes, and snippets.

View jonathanmaron's full-sized avatar

Jonathan Maron jonathanmaron

View GitHub Profile
@jonathanmaron
jonathanmaron / konjunktur_u_zukunftspaket.php
Last active June 5, 2020 06:22
PHP 7.4 implementation of the temporary change to VAT rates in Germany
<?php
declare(strict_types=1);
// Here is a simple implementation in PHP 7.4 of the temporary change to VAT rates in Germany.
use DateTime;
use DateTimeZone;
/**
* Between July 1, 2020 and December 31, 2020 the VAT in Germany
<?php
declare(strict_types=1);
include_once __DIR__ . '/vendor/autoload.php';
use TextControl\ReportingCloud\ReportingCloud;
use TextControl\ReportingCloud\Stdlib\ConsoleUtils;
use TextControl\ReportingCloud\Stdlib\Path;
$reportingCloud = new ReportingCloud([
/tmp/test_append_document_advanced.pdf
<?php
use TxTextControl\ReportingCloud\Console\Helper;
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
$documents = [
array(10) {
[0] =>
string(4) "This"
[1] =>
string(4) "Hiss"
[2] =>
string(6) "Thesis"
[3] =>
string(5) "Thins"
[4] =>
<?php
use TxTextControl\ReportingCloud\Console\Helper;
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getProofingSuggestions('Thiss', 'en_US.dic', 10));
array(49) {
[0] =>
string(9) "af_ZA.dic"
[1] =>
string(9) "an_ES.dic"
[2] =>
string(6) "ar.dic"
[3] =>
string(9) "be_BY.dic"
[4] =>
<?php
use TxTextControl\ReportingCloud\Console\Helper;
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getAvailableDictionaries());
array(2) {
[0] =>
array(5) {
'length' =>
int(5)
'start' =>
int(0)
'text' =>
string(5) "Thiss"
'is_duplicate' =>
<?php
use TxTextControl\ReportingCloud\Console\Helper;
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->proofingCheck('Thiss is a testt', 'en_US.dic'));