Skip to content

Commit

Permalink
Feature/php8.2 deprecation (#19)
Browse files Browse the repository at this point in the history
* fix php8.2 depreciation

* bump version

* cs fixes

---------

Co-authored-by: Mikolaj Popielarz <mikolaj.popielarz@kevin.eu>
  • Loading branch information
meekowhy and Mikolaj Popielarz authored May 19, 2023
1 parent fb29ec1 commit e9dc015
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 74 deletions.
26 changes: 0 additions & 26 deletions Api/Kevin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class Kevin
*/
protected $config;

/**
* @var
*/
protected $banks;

/**
Expand All @@ -42,9 +39,6 @@ public function __construct(
}

/**
* @param $clientId
* @param $clientSecret
*
* @return Client|void
*/
public function getConnection($clientId = null, $clientSecret = null)
Expand Down Expand Up @@ -150,8 +144,6 @@ public function getBanks($country = null)
}

/**
* @param $bankId
*
* @return array
*/
public function getBank($bankId)
Expand All @@ -167,8 +159,6 @@ public function getBank($bankId)
}

/**
* @param $params
*
* @return mixed
*/
public function initPayment($params)
Expand All @@ -177,9 +167,6 @@ public function initPayment($params)
}

/**
* @param $paymentId
* @param $attr
*
* @return mixed
*/
public function getPaymentStatus($paymentId, $attr)
Expand All @@ -188,9 +175,6 @@ public function getPaymentStatus($paymentId, $attr)
}

/**
* @param $paymentId
* @param $attr
*
* @return mixed
*/
public function getPayment($paymentId, $attr)
Expand All @@ -216,9 +200,6 @@ public function getAvailableCountries()
}

/**
* @param $paymentId
* @param $attr
*
* @return mixed
*/
public function initRefund($paymentId, $attr)
Expand All @@ -227,8 +208,6 @@ public function initRefund($paymentId, $attr)
}

/**
* @param $paymentId
*
* @return mixed|void
*/
public function getRefunds($paymentId)
Expand All @@ -240,11 +219,6 @@ public function getRefunds($paymentId)
}

/**
* @param $endpointSecret
* @param $requestBody
* @param $headers
* @param $webhookUrl
*
* @return mixed
*/
public function verifySignature($endpointSecret, $requestBody, $headers, $webhookUrl)
Expand Down
2 changes: 0 additions & 2 deletions Block/Adminhtml/Form/Field/Accounts/BankColumnViewBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public function setInputName($value)
/**
* Set "id" for <select> element.
*
* @param $value
*
* @return $this
*/
public function setInputId($value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public function setInputName($value)
/**
* Set "id" for <select> element.
*
* @param $value
*
* @return $this
*/
public function setInputId($value)
Expand Down
4 changes: 2 additions & 2 deletions Block/Adminhtml/System/Config/PaymentListButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public function getAjaxUrl()
}

/**
* @throws LocalizedException
*
* @return string
*
* @throws LocalizedException
*/
public function getButtonHtml()
{
Expand Down
7 changes: 5 additions & 2 deletions Gateway/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class Config extends \Magento\Payment\Gateway\Config\Config
*/
protected $serialize;

/**
* @var string|null
*/
private $methodCode;

/**
* @param string|null $methodCode
* @param string $pathPattern
Expand Down Expand Up @@ -204,8 +209,6 @@ public function setStatus($status)
}

/**
* @param $countryList
*
* @return void
*/
public function setCountryList($countryList)
Expand Down
8 changes: 0 additions & 8 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public function __construct(
}

/**
* @param $quoteId
*
* @return void
*
* @throws \Magento\Framework\Exception\NoSuchEntityException
Expand All @@ -70,8 +68,6 @@ public function setQuoteInactive($quoteId)
}

/**
* @param $tableName
*
* @return void
*/
public function truncateTable($tableName)
Expand All @@ -86,8 +82,6 @@ public function truncateTable($tableName)
}

/**
* @param $bankList
*
* @return bool
*/
public function saveAvailablePaymentList($bankList)
Expand All @@ -112,8 +106,6 @@ public function saveAvailablePaymentList($bankList)
}

/**
* @param $countryList
*
* @return void
*/
public function saveAvailableCountryList($countryList)
Expand Down
3 changes: 0 additions & 3 deletions Logger/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
*/
class Handler extends Base
{
/**
* @var
*/
protected $loggerType = Logger::INFO;

/**
Expand Down
9 changes: 0 additions & 9 deletions Model/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public function __construct(
}

/**
* @param $order
*
* @return array
*/
public function initPayment($order)
Expand Down Expand Up @@ -135,7 +133,6 @@ public function initPayment($order)

/**
* @param $payment
* @param $amount
*
* @return array
*/
Expand Down Expand Up @@ -196,8 +193,6 @@ public function createTransaction($order = null, $paymentData = [])
}

/**
* @param $transactionId
*
* @return mixed
*/
public function getTransaction($transactionId)
Expand All @@ -210,8 +205,6 @@ public function getTransaction($transactionId)
}

/**
* @param $uri
*
* @return string
*/
private function getWebHookContextUrl($uri)
Expand All @@ -224,8 +217,6 @@ private function getWebHookContextUrl($uri)
}

/**
* @param $uri
*
* @return string
*/
private function getRedirectContextUrl($uri)
Expand Down
12 changes: 1 addition & 11 deletions Model/Creditmemo/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Kevin\Payment\Model\Creditmemo;

use Exception;
use Magento\Backend\Model\Auth\Session;
use Magento\Framework\Registry;
use Magento\Sales\Api\CreditmemoRepositoryInterface;
Expand Down Expand Up @@ -59,8 +58,6 @@ public function __construct(
}

/**
* @param $creditmemoId
*
* @return \Magento\Sales\Model\Order
*
* @throws \Exception
Expand Down Expand Up @@ -152,7 +149,7 @@ public function deleteCreditmemo($creditmemoId)
// delete credit-memo by credit-memo object
$this->creditmemoRepository->delete($creditmemoData);
$this->orderRepository->save($order);
} catch (Exception $exception) {
} catch (\Exception $exception) {
echo $exception->getMessage();
exit;
$this->logger->critical($exception->getMessage());
Expand All @@ -161,10 +158,6 @@ public function deleteCreditmemo($creditmemoId)
return $order;
}

/**
* @param $creditmemo
* @param $order
*/
protected function setTotalandBaseTotal($creditmemo, $order)
{
if ($creditmemo->getDoTransaction()) {
Expand All @@ -178,9 +171,6 @@ protected function setTotalandBaseTotal($creditmemo, $order)
}
}

/**
* @param $order
*/
protected function saveOrder($order)
{
if ($order->hasShipments() || $order->hasInvoices() || $order->hasCreditmemos()) {
Expand Down
4 changes: 1 addition & 3 deletions Plugin/Sales/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ public function __construct(
}

/**
* @param $result
*
* @return mixed
*/
public function afterGetCanSendNewEmailFlag(
\Magento\Sales\Model\Order $subject,
$result
$result
) {
if ($subject->getPayment()->getMethodInstance()->getCode() == \Kevin\Payment\Model\Ui\ConfigProvider::CODE
&& !$this->config->getSendOrderEmailBefore()) {
Expand Down
2 changes: 0 additions & 2 deletions Plugin/Sales/Order/Email/Sender/InvoiceSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public function __construct(
}

/**
* @param $forceSyncMode
*
* @return void
*/
public function aroundSend(
Expand Down
2 changes: 0 additions & 2 deletions Plugin/Sales/Order/Handler/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public function __construct(
}

/**
* @param $order
*
* @return mixed|void
*/
public function aroundCheck(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "getkevin/kevin-magento2",
"description": "Implements integration with the Kevin payment service provider.",
"version": "1.3.3",
"version": "1.3.4",
"authors": [
{
"name": "kevin.",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Kevin_Payment" setup_version="1.3.3"/>
<module name="Kevin_Payment" setup_version="1.3.4"/>
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down

0 comments on commit e9dc015

Please sign in to comment.