<commit_before><?php

include __DIR__ . '/../vendor/autoload.php';

$cert = new \PhpNFe\Tools\Certificado\Certificado();
$cert->carregarPfx(__DIR__ . '/seuCertificado', 'suaSenha');

$nfe = new \PhpNFe\NFe\NFe($cert);

$xml = file_get_contents(__DIR__ . '/../tests/utils/xmlAutorizadoTeste.xml');

$ret = $nfe->cancela($xml, 'Justificativa Teste', '1');

$ehErro = $ret->isError();
$message = $ret->getMessage();
$code = $ret->getCode();

echo 'Foi!';
<commit_msg>Update cancelar.php<commit_after><?php

include __DIR__ . '/../vendor/autoload.php';

$cert = new \PhpNFe\Tools\Certificado\Certificado();
$cert->carregarPfx(__DIR__ . '/seuCertificado.pfx', 'suaSenha');

$nfe = new \PhpNFe\NFe\NFe($cert);

$xml = file_get_contents(__DIR__ . '/../tests/utils/xmlAutorizadoTeste.xml');

$ret = $nfe->cancela($xml, 'Justificativa Teste', '1');

$ehErro = $ret->isError();
$message = $ret->getMessage();
$code = $ret->getCode();

echo 'Foi!';

{'fraction_non_alphanumeric': 0.22388059701492538, 'fraction_numerical': 0.0021321961620469083, 'mean_word_length': 5.097402597402597, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7619648', 'n_tokens_mistral': 390, 'n_tokens_neox': 393, 'n_words': 59}