From 556fdf3c3c36ae0764f7c79ebd12c34652f500a5 Mon Sep 17 00:00:00 2001 From: RedDragonWebDesign Date: Thu, 4 May 2023 04:53:17 -0700 Subject: [PATCH] fix linter errors Every linter's rules are different, but overall I think these small adjustments are helpful for code readability, and for getting my linter to quiet down. --- src/PaypalIPN.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/PaypalIPN.php b/src/PaypalIPN.php index 7f510ed..a513c82 100644 --- a/src/PaypalIPN.php +++ b/src/PaypalIPN.php @@ -4,8 +4,8 @@ use \Exception; -class PaypalIPN -{ +class PaypalIPN { + /** @var bool $useSandbox Indicates if the sandbox endpoint is used. */ private $useSandbox = false; /** @var bool $useLocalCerts Indicates if the local certificates are used. */ @@ -28,8 +28,7 @@ class PaypalIPN * should not be enabled in production). * @return void */ - public function useSandbox() - { + public function useSandbox() { $this->useSandbox = true; } @@ -38,8 +37,7 @@ public function useSandbox() * environments). * @return void */ - public function usePHPCerts() - { + public function usePHPCerts() { $this->useLocalCerts = false; } @@ -48,8 +46,7 @@ public function usePHPCerts() * Determine endpoint to post the verification data to. * @return string */ - public function getPaypalUri() - { + public function getPaypalUri() { if ($this->useSandbox) { return self::SANDBOX_VERIFY_URI; } else { @@ -65,8 +62,7 @@ public function getPaypalUri() * @return bool * @throws Exception */ - function verifyIPN() - { + public function verifyIPN() { if (!count($_POST)) { throw new Exception("Missing POST Data"); } @@ -135,4 +131,3 @@ function verifyIPN() } } } -