Skip to content

Commit f5ee3f5

Browse files
darbaouiStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 1755daf commit f5ee3f5

File tree

5 files changed

+28
-43
lines changed

5 files changed

+28
-43
lines changed

src/LaravelHyperpay.php

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public function mada()
7474

7575
/**
7676
* Add billing data to the payment body.
77-
* @param BillingInterface $billing;
77+
*
78+
* @param BillingInterface $billing;
7879
*
7980
* return $this
8081
*/
@@ -88,12 +89,11 @@ public function addBilling(BillingInterface $billing)
8889
/**
8990
* Prepare the checkout.
9091
*
91-
* @param array $trackable_data
92-
* @param Model $user
93-
* @param float $amount
94-
* @param string $brand
95-
* @param Request $request
96-
*
92+
* @param array $trackable_data
93+
* @param Model $user
94+
* @param float $amount
95+
* @param string $brand
96+
* @param Request $request
9797
* @return \GuzzleHttp\Psr7\Response
9898
*/
9999
public function checkout(array $trackable_data, Model $user, $amount, $brand, Request $request)
@@ -115,10 +115,9 @@ public function checkout(array $trackable_data, Model $user, $amount, $brand, Re
115115
* Define the data used to generate a successful
116116
* response from hyperpay to generate the payment form.
117117
*
118-
* @param Model $user
119-
* @param array $trackable_data
120-
* @param Request $request
121-
*
118+
* @param Model $user
119+
* @param array $trackable_data
120+
* @param Request $request
122121
* @return \GuzzleHttp\Psr7\Response
123122
*/
124123
protected function prepareCheckout(Model $user, array $trackable_data, $request)
@@ -143,9 +142,8 @@ protected function prepareCheckout(Model $user, array $trackable_data, $request)
143142
/**
144143
* Check the payment status using $resourcePath and $checkout_id.
145144
*
146-
* @param string $resourcePath
147-
* @param string $checkout_id
148-
*
145+
* @param string $resourcePath
146+
* @param string $checkout_id
149147
* @return \GuzzleHttp\Psr7\Response
150148
*/
151149
public function paymentStatus(string $resourcePath, string $checkout_id)
@@ -165,8 +163,7 @@ public function paymentStatus(string $resourcePath, string $checkout_id)
165163
/**
166164
* Add merchantTransactionId.
167165
*
168-
* @param string $id
169-
*
166+
* @param string $id
170167
* @return $this
171168
*/
172169
public function addMerchantTransactionId($id)
@@ -179,8 +176,7 @@ public function addMerchantTransactionId($id)
179176
/**
180177
* Add redirection url to the shopper to finalize the payment.
181178
*
182-
* @param string $url
183-
*
179+
* @param string $url
184180
* @return $this
185181
*/
186182
public function addRedirectUrl($url)

src/Support/HttpClient.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ public function __construct(GuzzleClient $client, string $path, array $config)
3939
/**
4040
* Create a post sever-to-server request.
4141
*
42-
* @param array $parameters
43-
*
42+
* @param array $parameters
4443
* @return Response
4544
*/
4645
public function post(array $parameters): Response
@@ -65,8 +64,7 @@ public function post(array $parameters): Response
6564
/**
6665
* Create a get request to hyperpay used to check the status.
6766
*
68-
* @param array $parameters
69-
*
67+
* @param array $parameters
7068
* @return Response
7169
*/
7270
public function get(array $parameters): Response

src/Support/HttpParameters.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ class HttpParameters
1111
* Get the parameters that used in the request with hyperpay
1212
* to initilize the transaction and generate the form.
1313
*
14-
* @param float $amount
15-
* @param Model $user
14+
* @param float $amount
15+
* @param Model $user
1616
* @param array hyperpay config file with extra data added during the process
17-
* @param \Devinweb\LaravelHyperpay\Contracts\BillingInterface $billing
18-
*
17+
* @param \Devinweb\LaravelHyperpay\Contracts\BillingInterface $billing
1918
* @return array
2019
*/
2120
public function postParams($amount, $user, $heyPerPayConfig, $billing): array
@@ -32,8 +31,7 @@ public function postParams($amount, $user, $heyPerPayConfig, $billing): array
3231
/**
3332
* Get the entity id base on the checkout id of its for VISA/MASTER or MADA.
3433
*
35-
* @param string $checkout_id
36-
*
34+
* @param string $checkout_id
3735
* @return array
3836
*/
3937
public function getParams($checkout_id): array
@@ -46,10 +44,9 @@ public function getParams($checkout_id): array
4644
/**
4745
* Generate the basic user parameters.
4846
*
49-
* @param float $amount
50-
* @param Model $user
47+
* @param float $amount
48+
* @param Model $user
5149
* @param array hyperpay config file with extra data added during the process
52-
*
5350
* @return array
5451
*/
5552
protected function getBodyParameters($amount, Model $user, $heyPerPayConfig): array
@@ -79,8 +76,7 @@ protected function getBodyParameters($amount, Model $user, $heyPerPayConfig): ar
7976
/**
8077
* Get the billing data from the Billing class if a user generate one.
8178
*
82-
* @param Devinweb\LaravelHyperpay\Contracts\BillingInterface $billing
83-
*
79+
* @param Devinweb\LaravelHyperpay\Contracts\BillingInterface $billing
8480
* @return array
8581
*/
8682
protected function getBillingParameters($billing): array
@@ -95,8 +91,7 @@ protected function getBillingParameters($billing): array
9591
/**
9692
* Find the entityId from the transaction if its for MADA of else.
9793
*
98-
* @param string $id transaction id
99-
*
94+
* @param string $id transaction id
10095
* @return string
10196
*/
10297
protected function getEntityId($id)

src/Support/HttpResponse.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ protected function response(): array
207207
/**
208208
* Update the transation and dispatch events for both success and fail transaction.
209209
*
210-
* @param int $status
211-
* @param array $optionData
212-
*
210+
* @param int $status
211+
* @param array $optionData
213212
* @return void
214213
*/
215214
protected function updateTransaction($status, array $optionData)

src/Support/TransactionBuilder.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public function __construct($owner = null)
2828
* Create and clean pending transaction for the given user.
2929
*
3030
* @param array $transactionData
31-
*
3231
* @return \Deviwnweb\LaravelHyperpay\Models\Transaction
3332
*/
3433
public function create(array $transactionData)
@@ -53,8 +52,7 @@ public function create(array $transactionData)
5352
/**
5453
* Find the transaction in the database.
5554
*
56-
* @param string $id
57-
*
55+
* @param string $id
5856
* @return null|\Deviwnweb\LaravelHyperpay\Models\Transaction
5957
*/
6058
public function findByIdOrCheckoutId($id)
@@ -69,8 +67,7 @@ public function findByIdOrCheckoutId($id)
6967
* Find the brand (VISA/MASTER OR MADA) based on the entityID
7068
* default = VISA/MASTER.
7169
*
72-
* @param string $entityId
73-
*
70+
* @param string $entityId
7471
* @return string
7572
*/
7673
protected function getBrand($entityId)

0 commit comments

Comments
 (0)