diff --git a/.github/workflows/phplint.yml b/.github/workflows/phplint.yml index 4cc7ede..df416f9 100644 --- a/.github/workflows/phplint.yml +++ b/.github/workflows/phplint.yml @@ -16,7 +16,7 @@ jobs: - name: Lint Code Base uses: github/super-linter/slim@v4 env: - DEFAULT_BRANCH: master + DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} VALIDATE_PHP: true diff --git a/samples/Exchange.php b/samples/Exchange.php index 71d6031..f3bbd7c 100644 --- a/samples/Exchange.php +++ b/samples/Exchange.php @@ -1,4 +1,5 @@ process(); switch ($payOrder->getStateId()) { - case PayStatus::PENDING : + case PayStatus::PENDING: $responseResult = yourCodeToProcessPendingOrder($payOrder->getReference()); $responseMessage = 'Processed pending'; break; - case PayStatus::PAID : + case PayStatus::PAID: $responseResult = yourCodeToProcessPaidOrder($payOrder->getReference()); $responseMessage = 'Processed paid. Order: ' . $payOrder->getReference(); break; - default : + default: $responseResult = true; $responseMessage = 'No action defined for payment state ' . $payOrder->getStateId(); } @@ -33,7 +35,24 @@ $responseMessage = $exception->getMessage(); } -function yourCodeToProcessPendingOrder($orderId) { return true; } -function yourCodeToProcessPaidOrder($orderId) { return true; } +/** + * @phpcs:ignore + * @param string $orderId + * @return true + */ +function yourCodeToProcessPendingOrder($orderId) +{ + return true; +} + +/** + * @phpcs:ignore + * @param string $orderId + * @return true + */ +function yourCodeToProcessPaidOrder(string $orderId) +{ + return true; +} -$exchange->setResponse($responseResult, $responseMessage); \ No newline at end of file +$exchange->setResponse($responseResult, $responseMessage); diff --git a/src/Model/CheckoutOptions.php b/src/Model/CheckoutOptions.php index 5002b91..caaf924 100644 --- a/src/Model/CheckoutOptions.php +++ b/src/Model/CheckoutOptions.php @@ -53,10 +53,12 @@ public function addCheckoutOption(CheckoutOption $checkoutoption): self } /** + * @phpcs:disable * @inheritDoc */ public function getCollectionName(): string { return 'checkoutoptions'; } + /** @phpcs:enable */ }