Completed
Pull Request — master (#199)
by
unknown
18s
created
src/Client/PaystackClient.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             config('paystack.retry_delay', 150)
51 51
         )
52 52
             ->withHeaders([
53
-                'Authorization' => 'Bearer ' . $this->secretKey,
53
+                'Authorization' => 'Bearer '.$this->secretKey,
54 54
                 'Accept'        => 'application/json',
55 55
                 'Content-Type'  => 'application/json',
56 56
             ])
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     protected function handleErrors(Response $response): Response
74 74
     {
75
-        if (! $response->successful()) {
75
+        if (!$response->successful()) {
76 76
             $message = $response->json('message') ?? 'Paystack request failed.';
77 77
             Log::error('Paystack API error', ['response' => $response->body()]);
78 78
             throw new PaystackRequestException($message, $response);
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         $allowedMethods = [self::METHOD_GET, self::METHOD_POST, self::METHOD_PUT, self::METHOD_DELETE];
98 98
         $method = strtolower($method);
99 99
 
100
-        if (! in_array($method, $allowedMethods, true)) {
100
+        if (!in_array($method, $allowedMethods, true)) {
101 101
             throw new \InvalidArgumentException("Unsupported HTTP method: {$method}");
102 102
         }
103 103
 
104
-        $url = $this->baseUrl . '/' . ltrim($endpoint, '/');
104
+        $url = $this->baseUrl.'/'.ltrim($endpoint, '/');
105 105
         // $response = $this->client()->{$method}($url, $data);
106 106
 
107 107
         $client = $this->client();
Please login to merge, or discard this patch.
src/PaystackServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
     */
47 47
     public function register(): void
48 48
     {
49
-        $this->mergeConfigFrom(__DIR__ . '/../config/paystack.php', 'paystack');
49
+        $this->mergeConfigFrom(__DIR__.'/../config/paystack.php', 'paystack');
50 50
 
51
-        $this->app->singleton(PaystackClient::class, function () {
51
+        $this->app->singleton(PaystackClient::class, function() {
52 52
             return new PaystackClient(config('paystack.secretKey'));
53 53
         });
54 54
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $this->app->singleton(SubAccountService::class, fn ($app) => new SubAccountService($app->make(PaystackClient::class)));
61 61
         $this->app->singleton(BankService::class, fn ($app) => new BankService($app->make(PaystackClient::class)));
62 62
 
63
-        $this->app->singleton(Paystack::class, function ($app) {
63
+        $this->app->singleton(Paystack::class, function($app) {
64 64
             return new Paystack($app->make(PaystackClient::class));
65 65
         });
66 66
 
Please login to merge, or discard this patch.
src/Services/TransactionService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
      * @param int|string $id Transaction ID or reference string.
109 109
      * @return array<string, mixed>
110 110
      */
111
-    public function fetch(int|string $id): array
111
+    public function fetch(int | string $id): array
112 112
     {
113 113
         return $this->handle(fn () => $this->client->get("transaction/{$id}")->json());
114 114
     }
Please login to merge, or discard this patch.
src/Support/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
  *
16 16
  * @return \Unicodeveloper\Paystack\Paystack
17 17
 */
18
-if (! function_exists("paystack")) {
18
+if (!function_exists("paystack")) {
19 19
     function paystack(): Paystack
20 20
     {
21 21
         return app()->make('laravel-paystack');
Please login to merge, or discard this patch.
src/Support/TransRef.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
     */
23 23
     public static function generate(): string
24 24
     {
25
-        return 'TXN_' . uniqid() . '_' . bin2hex(random_bytes(4));
25
+        return 'TXN_'.uniqid().'_'.bin2hex(random_bytes(4));
26 26
     }
27 27
 }
Please login to merge, or discard this patch.