@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#page-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $page_id): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$page_id); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $page_id); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @link https://paystack.com/docs/api/#page-update |
49 | 49 | */ |
50 | - public function update(string $page_id, array $payload = []): self |
|
50 | + public function update(string $page_id, array $payload = [ ]): self |
|
51 | 51 | { |
52 | - $this->put($this->url(self::ENDPOINT).'/'.$page_id, $payload); |
|
52 | + $this->put($this->url(self::ENDPOINT) . '/' . $page_id, $payload); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function checkAvailability(string $slug): self |
63 | 63 | { |
64 | - $this->get($this->url(self::ENDPOINT).'/check_slug_availability/'.$slug); |
|
64 | + $this->get($this->url(self::ENDPOINT) . '/check_slug_availability/' . $slug); |
|
65 | 65 | |
66 | 66 | return $this; |
67 | 67 | } |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @link https://paystack.com/docs/api/#page-add-products |
73 | 73 | */ |
74 | - public function addProduct(int $page_id, array $payload = []): self |
|
74 | + public function addProduct(int $page_id, array $payload = [ ]): self |
|
75 | 75 | { |
76 | - $this->post($this->url(self::ENDPOINT).'/'.$page_id.'/product', $payload); |
|
76 | + $this->post($this->url(self::ENDPOINT) . '/' . $page_id . '/product', $payload); |
|
77 | 77 | |
78 | 78 | return $this; |
79 | 79 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#suzbscription-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $subscription_id): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$subscription_id); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $subscription_id); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function enable(array $payload): self |
51 | 51 | { |
52 | - $this->post($this->url(self::ENDPOINT).'/enable', $payload); |
|
52 | + $this->post($this->url(self::ENDPOINT) . '/enable', $payload); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function disable(array $payload): self |
63 | 63 | { |
64 | - $this->post($this->url(self::ENDPOINT).'/disable', $payload); |
|
64 | + $this->post($this->url(self::ENDPOINT) . '/disable', $payload); |
|
65 | 65 | |
66 | 66 | return $this; |
67 | 67 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#invoice-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $invoice_id): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$invoice_id); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $invoice_id); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function verify(string $invoice_code): self |
51 | 51 | { |
52 | - $this->get($this->url(self::ENDPOINT).'/verify/'.$invoice_code); |
|
52 | + $this->get($this->url(self::ENDPOINT) . '/verify/' . $invoice_code); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function notify(string $invoice_code): self |
63 | 63 | { |
64 | - $this->post($this->url(self::ENDPOINT).'/notify/'.$invoice_code); |
|
64 | + $this->post($this->url(self::ENDPOINT) . '/notify/' . $invoice_code); |
|
65 | 65 | |
66 | 66 | return $this; |
67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function totals(): self |
75 | 75 | { |
76 | - $this->post($this->url(self::ENDPOINT).'/totals'); |
|
76 | + $this->post($this->url(self::ENDPOINT) . '/totals'); |
|
77 | 77 | |
78 | 78 | return $this; |
79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function finalize(string $invoice_code): self |
87 | 87 | { |
88 | - $this->post($this->url(self::ENDPOINT).'/finalize/'.$invoice_code); |
|
88 | + $this->post($this->url(self::ENDPOINT) . '/finalize/' . $invoice_code); |
|
89 | 89 | |
90 | 90 | return $this; |
91 | 91 | } |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | * |
96 | 96 | * @link https://paystack.com/docs/api/#invoice-update |
97 | 97 | */ |
98 | - public function update(string $invoice_id, array $payload = []): self |
|
98 | + public function update(string $invoice_id, array $payload = [ ]): self |
|
99 | 99 | { |
100 | - $this->put($this->url(self::ENDPOINT).'/'.$invoice_id, $payload); |
|
100 | + $this->put($this->url(self::ENDPOINT) . '/' . $invoice_id, $payload); |
|
101 | 101 | |
102 | 102 | return $this; |
103 | 103 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function archive(string $invoice_code): self |
111 | 111 | { |
112 | - $this->post($this->url(self::ENDPOINT).'/archive/'.$invoice_code); |
|
112 | + $this->post($this->url(self::ENDPOINT) . '/archive/' . $invoice_code); |
|
113 | 113 | |
114 | 114 | return $this; |
115 | 115 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#product-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $product_id): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$product_id); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $product_id); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @link https://paystack.com/docs/api/#product-update |
49 | 49 | */ |
50 | - public function update(string $product_id, array $payload = []): self |
|
50 | + public function update(string $product_id, array $payload = [ ]): self |
|
51 | 51 | { |
52 | - $this->put($this->url(self::ENDPOINT).'/'.$product_id, $payload); |
|
52 | + $this->put($this->url(self::ENDPOINT) . '/' . $product_id, $payload); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function createBulk(array $payload): self |
27 | 27 | { |
28 | - $this->post($this->url(self::ENDPOINT).'/bulk', $payload); |
|
28 | + $this->post($this->url(self::ENDPOINT) . '/bulk', $payload); |
|
29 | 29 | |
30 | 30 | return $this; |
31 | 31 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @link https://paystack.com/docs/api/#transfer-recipient-list |
37 | 37 | */ |
38 | - public function list(array $query = []): self |
|
38 | + public function list(array $query = [ ]): self |
|
39 | 39 | { |
40 | 40 | $this->get($this->url(self::ENDPOINT), $query); |
41 | 41 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function fetch(string $customer_email): self |
51 | 51 | { |
52 | - $this->get($this->url(self::ENDPOINT).'/'.$customer_email); |
|
52 | + $this->get($this->url(self::ENDPOINT) . '/' . $customer_email); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @link https://paystack.com/docs/api/#transfer-recipient-update |
61 | 61 | */ |
62 | - public function update(string $recipient_code, array $payload = []): self |
|
62 | + public function update(string $recipient_code, array $payload = [ ]): self |
|
63 | 63 | { |
64 | - $this->put($this->url(self::ENDPOINT).'/'.$recipient_code, $payload); |
|
64 | + $this->put($this->url(self::ENDPOINT) . '/' . $recipient_code, $payload); |
|
65 | 65 | |
66 | 66 | return $this; |
67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function deactivate(string $recipient_code): self |
75 | 75 | { |
76 | - $this->delete($this->url(self::ENDPOINT).'/'.$recipient_code); |
|
76 | + $this->delete($this->url(self::ENDPOINT) . '/' . $recipient_code); |
|
77 | 77 | |
78 | 78 | return $this; |
79 | 79 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * |
10 | 10 | * @link https://paystack.com/docs/api/#verification-resolve-account |
11 | 11 | */ |
12 | - public function bank(array $query = []): self |
|
12 | + public function bank(array $query = [ ]): self |
|
13 | 13 | { |
14 | 14 | $this->get($this->url('/bank/resolve'), $query); |
15 | 15 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @link https://paystack.com/docs/api/#verification-match-bvn |
23 | 23 | */ |
24 | - public function bvn(array $payload = []): self |
|
24 | + public function bvn(array $payload = [ ]): self |
|
25 | 25 | { |
26 | 26 | $this->post('/bvn/match', $payload); |
27 | 27 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function card(string $card_bin): self |
37 | 37 | { |
38 | - $this->get('/decision/bin/'.$card_bin); |
|
38 | + $this->get('/decision/bin/' . $card_bin); |
|
39 | 39 | |
40 | 40 | return $this; |
41 | 41 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#plan-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $plan_id): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$plan_id); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $plan_id); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @link https://paystack.com/docs/api/#plan-update |
49 | 49 | */ |
50 | - public function update(string $plan_id, array $payload = []): self |
|
50 | + public function update(string $plan_id, array $payload = [ ]): self |
|
51 | 51 | { |
52 | - $this->put($this->url(self::ENDPOINT).'/'.$plan_id, $payload); |
|
52 | + $this->put($this->url(self::ENDPOINT) . '/' . $plan_id, $payload); |
|
53 | 53 | |
54 | 54 | return $this; |
55 | 55 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @link https://paystack.com/docs/api/#refund-list |
25 | 25 | */ |
26 | - public function list(array $query = []): self |
|
26 | + public function list(array $query = [ ]): self |
|
27 | 27 | { |
28 | 28 | $this->get($this->url(self::ENDPOINT), $query); |
29 | 29 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function fetch(string $reference): self |
39 | 39 | { |
40 | - $this->get($this->url(self::ENDPOINT).'/'.$reference); |
|
40 | + $this->get($this->url(self::ENDPOINT) . '/' . $reference); |
|
41 | 41 | |
42 | 42 | return $this; |
43 | 43 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function response(string $key = ''): ?array |
43 | 43 | { |
44 | - if (! empty($key)) { |
|
44 | + if (!empty($key)) { |
|
45 | 45 | return $this->response->json($key); |
46 | 46 | } else { |
47 | 47 | return $this->response->json(); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | protected function url(string $endpoint): string |
52 | 52 | { |
53 | - return Endpoint::BASE_URL."$endpoint"; |
|
53 | + return Endpoint::BASE_URL . "$endpoint"; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @param array|string|null $query |
60 | 60 | */ |
61 | - protected function get(string $url, $query = []): self |
|
61 | + protected function get(string $url, $query = [ ]): self |
|
62 | 62 | { |
63 | 63 | $response = $this->paystack->getConnection()->get($url, $query); |
64 | 64 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Make a http post request |
72 | 72 | */ |
73 | - protected function post(string $url, array $payload = []): self |
|
73 | + protected function post(string $url, array $payload = [ ]): self |
|
74 | 74 | { |
75 | 75 | $response = $this->paystack->getConnection()->post($url, $payload); |
76 | 76 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * Make a http put request |
84 | 84 | */ |
85 | - protected function put(string $url, array $payload = []): self |
|
85 | + protected function put(string $url, array $payload = [ ]): self |
|
86 | 86 | { |
87 | 87 | $response = $this->paystack->getConnection()->put($url, $payload); |
88 | 88 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * Make a http put request |
96 | 96 | */ |
97 | - protected function delete(string $url, array $payload = []): self |
|
97 | + protected function delete(string $url, array $payload = [ ]): self |
|
98 | 98 | { |
99 | 99 | $response = $this->paystack->getConnection()->delete($url, $payload); |
100 | 100 |