Completed
Push — master ( 1e262c...a9b5a2 )
by Kazi Mainuddin
09:32 queued 01:58
created
src/Components/Form.php 7 patches
Doc Comments   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Unused Use Statements   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Indentation   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Switch Indentation   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Spacing   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Braces   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -14 removed lines patch added patch discarded remove patch
@@ -21,17 +21,3 @@
 block discarded – undo
21 21
     public function render()
22 22
     {
23 23
         return <<<'blade'
24
-            <div style="display: none;">
25
-                <form action="{{ $endpoint }}" id="payment_form" method="POST">
26
-                    @foreach($fields as $key => $value)
27
-                        <input type="hidden" name="{{ $key }}" value="{{ $value }}">
28
-                    @endforeach
29
-                </form>
30
-            </div>
31
-
32
-            <script>
33
-                document.getElementById('payment_form').submit();
34
-            </script>
35
-        blade;
36
-    }
37
-}
Please login to merge, or discard this patch.
database/migrations/create_payu_transactions_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::create('payu_transactions', function (Blueprint $table) {
11
+        Schema::create('payu_transactions', function(Blueprint $table) {
12 12
             $table->id();
13 13
             $table->unsignedBigInteger('paid_for_id')->nullable();
14 14
             $table->string('paid_for_type')->nullable();
Please login to merge, or discard this patch.
tests/database/factories/ModelFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 use Tzsk\Payu\Models\PayuTransaction;
10 10
 
11 11
 /* @var Illuminate\Database\Eloquent\Factory $factory */
12
-$factory->define(PayuTransaction::class, function (Generator $faker) {
12
+$factory->define(PayuTransaction::class, function(Generator $faker) {
13 13
     $customer = Customer::make()
14 14
         ->firstName($faker->firstName)
15 15
         ->email($faker->email);
Please login to merge, or discard this patch.
tests/TestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         ]);
33 33
 //        $app['config']->set('payu.gateways, ');
34 34
 
35
-        include_once __DIR__ . '/../database/migrations/create_payu_transactions_table.php';
35
+        include_once __DIR__.'/../database/migrations/create_payu_transactions_table.php';
36 36
         (new CreatePayuTransactionsTable())->up();
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/PayuServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
     {
16 16
         if ($this->app->runningInConsole()) {
17 17
             $this->publishes([
18
-                __DIR__ . '/../config/payu.php' => config_path('payu.php'),
18
+                __DIR__.'/../config/payu.php' => config_path('payu.php'),
19 19
             ], 'payu-config');
20 20
 
21 21
             $this->publishes([
22
-                __DIR__ . '/../resources/views' => base_path('resources/views/vendor/payu'),
22
+                __DIR__.'/../resources/views' => base_path('resources/views/vendor/payu'),
23 23
             ], 'payu-template');
24 24
 
25 25
             $migrationFileName = 'create_payu_transactions_table.php';
26
-            $source = __DIR__ . "/../database/migrations/{$migrationFileName}";
26
+            $source = __DIR__."/../database/migrations/{$migrationFileName}";
27 27
 
28
-            if (! $this->migrationFileExists($migrationFileName)) {
29
-                $destination = database_path('migrations/' . date('Y_m_d_His', time()) . '_' . $migrationFileName);
28
+            if (!$this->migrationFileExists($migrationFileName)) {
29
+                $destination = database_path('migrations/'.date('Y_m_d_His', time()).'_'.$migrationFileName);
30 30
                 $this->publishes([$source => $destination], 'payu-migration');
31 31
             }
32 32
 
@@ -36,20 +36,20 @@  discard block
 block discarded – undo
36 36
             ]);
37 37
         }
38 38
 
39
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'payu');
40
-        $this->loadRoutesFrom(__DIR__ . '/../routes/payu.php');
41
-        $this->callAfterResolving(BladeCompiler::class, function () {
39
+        $this->loadViewsFrom(__DIR__.'/../resources/views', 'payu');
40
+        $this->loadRoutesFrom(__DIR__.'/../routes/payu.php');
41
+        $this->callAfterResolving(BladeCompiler::class, function() {
42 42
             Blade::component(Form::class, 'payu-form');
43 43
         });
44 44
 
45
-        $this->app->bind('payu', function () {
45
+        $this->app->bind('payu', function() {
46 46
             return new Payu();
47 47
         });
48 48
     }
49 49
 
50 50
     public function register(): void
51 51
     {
52
-        $this->mergeConfigFrom(__DIR__ . '/../config/payu.php', 'payu');
52
+        $this->mergeConfigFrom(__DIR__.'/../config/payu.php', 'payu');
53 53
     }
54 54
 
55 55
     public static function migrationFileExists(string $migrationFileName): bool
Please login to merge, or discard this patch.
src/Concerns/Transaction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         return $this;
37 37
     }
38 38
 
39
-    public function for(string $productInfo): self
39
+    public function for (string $productInfo): self
40 40
     {
41 41
         $this->productInfo = $productInfo;
42 42
 
Please login to merge, or discard this patch.
src/Actions/VerifyPayuBiz.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function handle(PayuTransaction $transaction): bool
23 23
     {
24
-        if (! $transaction->shouldVerify()) {
24
+        if (!$transaction->shouldVerify()) {
25 25
             return false;
26 26
         }
27 27
         $this->initialize($transaction);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             'command' => $command,
59 59
         ]);
60 60
         $sequence = collect(['key', 'command', 'id', 'salt'])
61
-            ->map(fn ($key) => data_get($values, $key))
61
+            ->map(fn($key) => data_get($values, $key))
62 62
             ->join('|');
63 63
 
64 64
         return [
Please login to merge, or discard this patch.
src/Actions/VerifyPayuMoney.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public function handle(PayuTransaction $transaction)
23 23
     {
24
-        if (! $transaction->shouldVerify()) {
24
+        if (!$transaction->shouldVerify()) {
25 25
             return false;
26 26
         }
27 27
 
Please login to merge, or discard this patch.
src/Payu.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         Validator::make(compact('url'), ['url' => 'required|url'])->validate();
52 52
 
53 53
         $this->destination = $url;
54
-        if (! $this->gateway) {
54
+        if (!$this->gateway) {
55 55
             $this->via($this->defaultGateway());
56 56
         }
57 57
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
     protected function morphFields()
102 102
     {
103
-        if (! $this->payment->model) {
103
+        if (!$this->payment->model) {
104 104
             return [];
105 105
         }
106 106
 
Please login to merge, or discard this patch.