From 2686095250019dadf4e3ed9a5b5f7a902efae205 Mon Sep 17 00:00:00 2001 From: hafijul233 Date: Sun, 30 Jun 2024 19:34:02 +0000 Subject: [PATCH] Fix styling --- src/Contracts/OrderQuotation.php | 1 - src/Contracts/ProceedOrder.php | 1 - src/Http/Controllers/AssignVendorController.php | 5 +---- .../Resources/AssignableVendorCollection.php | 1 - src/Services/AssignVendorService.php | 16 ++++++++-------- src/Traits/AuthRelations.php | 4 +--- src/Traits/BusinessRelations.php | 4 +--- src/Traits/MetaDataRelations.php | 4 +--- src/Vendors/AgraniBankApi.php | 2 +- src/Vendors/CityBankApi.php | 5 +---- src/Vendors/EmqApi.php | 8 ++------ src/Vendors/IslamiBankApi.php | 5 +++-- src/Vendors/TransFastApi.php | 2 +- src/Vendors/ValYouApi.php | 2 +- 14 files changed, 21 insertions(+), 39 deletions(-) diff --git a/src/Contracts/OrderQuotation.php b/src/Contracts/OrderQuotation.php index 303484f..9d920e2 100644 --- a/src/Contracts/OrderQuotation.php +++ b/src/Contracts/OrderQuotation.php @@ -2,7 +2,6 @@ namespace Fintech\Remit\Contracts; - interface OrderQuotation { /** diff --git a/src/Contracts/ProceedOrder.php b/src/Contracts/ProceedOrder.php index 09e830c..4d562c6 100644 --- a/src/Contracts/ProceedOrder.php +++ b/src/Contracts/ProceedOrder.php @@ -2,7 +2,6 @@ namespace Fintech\Remit\Contracts; - interface ProceedOrder { /** diff --git a/src/Http/Controllers/AssignVendorController.php b/src/Http/Controllers/AssignVendorController.php index 073e37f..47cb3ca 100644 --- a/src/Http/Controllers/AssignVendorController.php +++ b/src/Http/Controllers/AssignVendorController.php @@ -3,11 +3,8 @@ namespace Fintech\Remit\Http\Controllers; use App\Http\Controllers\Controller; -use ErrorException; use Exception; -use Fintech\Business\Facades\Business; use Fintech\Core\Abstracts\BaseModel; -use Fintech\Remit\Contracts\OrderQuotation; use Fintech\Remit\Facades\Remit; use Fintech\Remit\Http\Requests\AssignableVendorInfoRequest; use Fintech\Remit\Http\Resources\AssignableVendorCollection; @@ -21,7 +18,7 @@ private function getOrder($id): BaseModel { $order = Transaction::order()->find($id); - if (!$order) { + if (! $order) { throw (new ModelNotFoundException)->setModel(config('fintech.transaction.order_model'), $id); } diff --git a/src/Http/Resources/AssignableVendorCollection.php b/src/Http/Resources/AssignableVendorCollection.php index 2ee283c..f432244 100644 --- a/src/Http/Resources/AssignableVendorCollection.php +++ b/src/Http/Resources/AssignableVendorCollection.php @@ -2,7 +2,6 @@ namespace Fintech\Remit\Http\Resources; -use Fintech\Core\Supports\Constant; use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\ResourceCollection; diff --git a/src/Services/AssignVendorService.php b/src/Services/AssignVendorService.php index 6c76a0d..0375d47 100644 --- a/src/Services/AssignVendorService.php +++ b/src/Services/AssignVendorService.php @@ -27,7 +27,7 @@ public function requestQuote(BaseModel $order, string $vendor_slug): mixed { $availableVendors = config('fintech.remit.providers', []); - if (!isset($availableVendors[$vendor_slug])) { + if (! isset($availableVendors[$vendor_slug])) { throw new ErrorException('Service Vendor is not available on the configuration.'); } @@ -37,7 +37,7 @@ public function requestQuote(BaseModel $order, string $vendor_slug): mixed $instance = App::make($driverClass); - if (!$instance instanceof OrderQuotation) { + if (! $instance instanceof OrderQuotation) { throw new ErrorException('Service Vendor Class is not instance of `Fintech\Remit\Contracts\OrderQuotation` interface.'); } @@ -48,7 +48,7 @@ public function processOrder(BaseModel $order, string $vendor_slug): mixed { $availableVendors = config('fintech.remit.providers', []); - if (!isset($availableVendors[$vendor_slug])) { + if (! isset($availableVendors[$vendor_slug])) { throw new ErrorException('Service Vendor is not available on the configuration.'); } @@ -58,7 +58,7 @@ public function processOrder(BaseModel $order, string $vendor_slug): mixed $instance = App::make($driverClass); - if (!$instance instanceof OrderQuotation) { + if (! $instance instanceof OrderQuotation) { throw new ErrorException('Service Vendor Class is not instance of `Fintech\Remit\Contracts\OrderQuotation` interface.'); } @@ -69,7 +69,7 @@ public function orderStatus(BaseModel $order, string $vendor_slug): mixed { $availableVendors = config('fintech.remit.providers', []); - if (!isset($availableVendors[$vendor_slug])) { + if (! isset($availableVendors[$vendor_slug])) { throw new ErrorException('Service Vendor is not available on the configuration.'); } @@ -79,7 +79,7 @@ public function orderStatus(BaseModel $order, string $vendor_slug): mixed $instance = App::make($driverClass); - if (!$instance instanceof OrderQuotation) { + if (! $instance instanceof OrderQuotation) { throw new ErrorException('Service Vendor Class is not instance of `Fintech\Remit\Contracts\OrderQuotation` interface.'); } @@ -90,7 +90,7 @@ public function cancelOrder(BaseModel $order, string $vendor_slug): mixed { $availableVendors = config('fintech.remit.providers', []); - if (!isset($availableVendors[$vendor_slug])) { + if (! isset($availableVendors[$vendor_slug])) { throw new ErrorException('Service Vendor is not available on the configuration.'); } @@ -100,7 +100,7 @@ public function cancelOrder(BaseModel $order, string $vendor_slug): mixed $instance = App::make($driverClass); - if (!$instance instanceof OrderQuotation) { + if (! $instance instanceof OrderQuotation) { throw new ErrorException('Service Vendor Class is not instance of `Fintech\Remit\Contracts\OrderQuotation` interface.'); } diff --git a/src/Traits/AuthRelations.php b/src/Traits/AuthRelations.php index c414007..d2df680 100644 --- a/src/Traits/AuthRelations.php +++ b/src/Traits/AuthRelations.php @@ -24,7 +24,5 @@ public function user(): BelongsTo } } } else { - trait AuthRelations - { - } + trait AuthRelations {} } diff --git a/src/Traits/BusinessRelations.php b/src/Traits/BusinessRelations.php index af528bd..e2b42b5 100644 --- a/src/Traits/BusinessRelations.php +++ b/src/Traits/BusinessRelations.php @@ -15,7 +15,5 @@ public function service(): BelongsTo } } } else { - trait BusinessRelations - { - } + trait BusinessRelations {} } diff --git a/src/Traits/MetaDataRelations.php b/src/Traits/MetaDataRelations.php index 9ef5792..f3dcd5b 100644 --- a/src/Traits/MetaDataRelations.php +++ b/src/Traits/MetaDataRelations.php @@ -24,7 +24,5 @@ public function destinationCountry(): BelongsTo } } } else { - trait MetaDataRelations - { - } + trait MetaDataRelations {} } diff --git a/src/Vendors/AgraniBankApi.php b/src/Vendors/AgraniBankApi.php index e3dee5e..ad51fe2 100644 --- a/src/Vendors/AgraniBankApi.php +++ b/src/Vendors/AgraniBankApi.php @@ -623,7 +623,7 @@ public function getData($url, $params = []) } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order */ public function requestQuote($order): mixed { diff --git a/src/Vendors/CityBankApi.php b/src/Vendors/CityBankApi.php index 26545c4..6d6cc20 100644 --- a/src/Vendors/CityBankApi.php +++ b/src/Vendors/CityBankApi.php @@ -53,10 +53,7 @@ public function __construct() * * @throws Exception */ - public function getTnxStatus($inputs_data) - { - - } + public function getTnxStatus($inputs_data) {} /** * bKash customer validation service will help you to validate the beneficiary bkash number before send the transaction diff --git a/src/Vendors/EmqApi.php b/src/Vendors/EmqApi.php index 6a99ffc..eedc6d1 100644 --- a/src/Vendors/EmqApi.php +++ b/src/Vendors/EmqApi.php @@ -12,7 +12,6 @@ use Fintech\Remit\Contracts\OrderQuotation; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Log; -use MongoDB\Laravel\Eloquent\Model; use stdClass; class EmqApi implements BankTransfer, OrderQuotation @@ -1350,7 +1349,7 @@ public function vendorBalance(array $accountInfo = []): mixed } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order */ public function requestQuote($order): mixed { @@ -1359,8 +1358,5 @@ public function requestQuote($order): mixed ]; } - protected function getBalanceFromCurrency(string $currency, $response) - { - - } + protected function getBalanceFromCurrency(string $currency, $response) {} } diff --git a/src/Vendors/IslamiBankApi.php b/src/Vendors/IslamiBankApi.php index 817c8fc..c1f10b6 100644 --- a/src/Vendors/IslamiBankApi.php +++ b/src/Vendors/IslamiBankApi.php @@ -856,7 +856,8 @@ public function fetchBalance(string $currency): array } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * * @throws Exception */ public function requestQuote($order): mixed @@ -865,7 +866,7 @@ public function requestQuote($order): mixed } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order */ public function processOrder($order): mixed { diff --git a/src/Vendors/TransFastApi.php b/src/Vendors/TransFastApi.php index 9bc9b4e..28c0619 100644 --- a/src/Vendors/TransFastApi.php +++ b/src/Vendors/TransFastApi.php @@ -978,7 +978,7 @@ public function postCreateTransaction($data) } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order */ public function requestQuote($order): mixed { diff --git a/src/Vendors/ValYouApi.php b/src/Vendors/ValYouApi.php index 0fa7c00..d3b7e76 100644 --- a/src/Vendors/ValYouApi.php +++ b/src/Vendors/ValYouApi.php @@ -666,7 +666,7 @@ public function authorizedConfirmed($input_data) } /** - * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order + * @param \Illuminate\Database\Eloquent\Model|\Fintech\Core\Abstracts\BaseModel $order */ public function requestQuote($order): mixed {