Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Definitions/CancelStorePending.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class CancelStorePending extends Enum
{
public function asBool(): bool
{
return ('yes' === $this->value());
return 'yes' === $this->value();
}
}
2 changes: 1 addition & 1 deletion src/Helpers/GetSatStatusExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function fromXmlDocument(DOMDocument $document): self
$values = $discoverer->obtain($document);
} catch (UnmatchedDocumentException $exception) {
$message = 'Unable to obtain the expression values, document must be valid a CFDI version 4.0, 3.3 or 3.2';
throw new RuntimeException($message, 0, $exception);
throw new RuntimeException($message, previous: $exception);
}
return new self($values);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Cancel/AcceptRejectUuidStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public function getMessage(): string

public function isSuccess(): bool
{
return ('1000' === $this->getCode());
return '1000' === $this->getCode();
}
}
2 changes: 1 addition & 1 deletion src/Services/Stamping/StampingResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ public function alerts(): StampingAlerts

public function hasAlerts(): bool
{
return ($this->alerts->count() > 0);
return $this->alerts->count() > 0;
}
}
2 changes: 1 addition & 1 deletion src/SoapCaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function call(string $methodName, array $parameters): stdClass
),
JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES
)));
throw new RuntimeException(sprintf('Fail soap call to %s', $methodName), 0, $exception);
throw new RuntimeException(sprintf('Fail soap call to %s', $methodName), previous: $exception);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class AcceptRejectSignatureServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-accept-reject-signature-response.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-accept-reject-signature-response.json'));
$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
$settings = $this->createSettingsFromEnvironment($soapFactory);
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Cancel/CancelSignatureServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class CancelSignatureServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-cancelsignature-response-2-items.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-cancelsignature-response-2-items.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Cancel/GetPendingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class GetPendingServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-get-pending-response-2-items.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-get-pending-response-2-items.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Cancel/GetReceiptServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class GetReceiptServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-get-receipt-response.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-get-receipt-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class GetRelatedSignatureServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-get-related-signature-response.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-get-related-signature-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Cancel/GetSatStatusServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class GetSatStatusServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('cancel-get-sat-status-response.json'));
$preparedResult = json_decode($this->fileContentPath('cancel-get-sat-status-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Manifest/GetContractsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class GetContractsServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('manifest-getcontracts-response.json'));
$preparedResult = json_decode($this->fileContentPath('manifest-getcontracts-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class GetSignedContractsServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('manifest-getsignedcontracts-response.json'));
$preparedResult = json_decode($this->fileContentPath('manifest-getsignedcontracts-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Manifest/SignContractsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class SignContractsServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('manifest-signcontracts-response.json'));
$preparedResult = json_decode($this->fileContentPath('manifest-signcontracts-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Registration/AddServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class AddServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-add-response.json'));
$preparedResult = json_decode($this->fileContentPath('registration-add-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Registration/AssignServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class AssignServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-assign-response.json'));
$preparedResult = json_decode($this->fileContentPath('registration-assign-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Registration/EditServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class EditServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-edit-response.json'));
$preparedResult = json_decode($this->fileContentPath('registration-edit-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class ObtainCustomersServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-customers-response-2-items.json'));
$preparedResult = json_decode($this->fileContentPath('registration-customers-response-2-items.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Registration/ObtainServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class ObtainServiceTest extends TestCase
public function testServiceUsingPreparedResultWithRfc(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-get-response.json'));
$preparedResult = json_decode($this->fileContentPath('registration-get-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Registration/SwitchServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class SwitchServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('registration-switch-response.json'));
$preparedResult = json_decode($this->fileContentPath('registration-switch-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class CancelSignatureServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('retentions-cancelsignature-response.json'));
$preparedResult = json_decode($this->fileContentPath('retentions-cancelsignature-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Retentions/StampServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class StampServiceTest extends TestCase
public function testSignStampSendXmlAndProcessPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('retentions-stamp-response.json'));
$preparedResult = json_decode($this->fileContentPath('retentions-stamp-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Retentions/StampedServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class StampedServiceTest extends TestCase
public function testSignStampSendXmlAndProcessPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('retentions-stamped-response.json'));
$preparedResult = json_decode($this->fileContentPath('retentions-stamped-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Stamping/QueryPendingServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class QueryPendingServiceTest extends TestCase
public function testCall(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('querypending-response.json'));
$preparedResult = json_decode($this->fileContentPath('querypending-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Stamping/QuickStampServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class QuickStampServiceTest extends TestCase
public function testQuickStampSendXmlAndProcessPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('quickstamp-response-with-alerts.json'));
$preparedResult = json_decode($this->fileContentPath('quickstamp-response-with-alerts.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Stamping/StampServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class StampServiceTest extends TestCase
public function testStampSendXmlAndProcessPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('stamp-response-with-alerts.json'));
$preparedResult = json_decode($this->fileContentPath('stamp-response-with-alerts.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Stamping/StampedServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class StampedServiceTest extends TestCase
public function testStampedSendXmlAndProcessPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('stamped-response-with-alerts.json'));
$preparedResult = json_decode($this->fileContentPath('stamped-response-with-alerts.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Services/Utilities/DatetimeServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class DatetimeServiceTest extends TestCase
public function testDatetimeServiceUsingPreparedResultWithEmptyPostalCode(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-datetime-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-datetime-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand All @@ -34,7 +34,7 @@ public function testDatetimeServiceUsingPreparedResultWithEmptyPostalCode(): voi
public function testDatetimeServiceUsingPreparedResultWithPostalCode(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-datetime-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-datetime-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Utilities/DownloadXmlServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class DownloadXmlServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-getxml-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-getxml-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Utilities/ReportCreditServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class ReportCreditServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-report-credit-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-report-credit-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Utilities/ReportTotalServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class ReportTotalServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-report-total-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-report-total-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Utilities/ReportUuidServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class ReportUuidServiceTest extends TestCase
public function testServiceUsingPreparedResult(): void
{
/** @var stdClass $preparedResult */
$preparedResult = json_decode(TestCase::fileContentPath('utilities-report-uuid-response.json'));
$preparedResult = json_decode($this->fileContentPath('utilities-report-uuid-response.json'));

$soapFactory = new FakeSoapFactory();
$soapFactory->preparedResult = $preparedResult;
Expand Down