Test Setup Failed
Branch development (80c362)
by Ashutosh
14:59
created
app/Http/Controllers/Auth/ForgotPasswordController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
             $user = new \App\User();
64 64
             $user = $user->where('email', $email)->first();
65
-            if (! $user) {
65
+            if (!$user) {
66 66
                 return redirect()->back()->with('fails', 'Invalid Email');
67 67
             }
68 68
             //check in the settings
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 $mail->sendEmail($from, $to, $data, $subject, $replace, $type);
93 93
             }
94 94
 
95
-            $response = ['type' => 'success',   'message' =>'Reset instructions have been mailed to '.$to.'
95
+            $response = ['type' => 'success', 'message' =>'Reset instructions have been mailed to '.$to.'
96 96
     .Be sure to check your Junk folder if you do not see an email from us in your Inbox within a few minutes.'];
97 97
 
98 98
             return response()->json($response);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/BaseAuthController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
             $activate_model = new AccountActivate();
150 150
             $user = $user->where('email', $email)->first();
151
-            if (! $user) {
151
+            if (!$user) {
152 152
                 throw new \Exception('User with this email does not exist');
153 153
             }
154 154
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         if ($pipeDriveStatus) {
197 197
             $token = ApiKey::pluck('pipedrive_api_key')->first();
198 198
             $result = $this->searchUserPresenceInPipedrive($user->email, $token);
199
-            if (! $result) {
199
+            if (!$result) {
200 200
                 $countryFullName = Country::where('country_code_char2', $user->country)->pluck('nicename')->first();
201 201
                 $pipedrive = new \Devio\Pipedrive\Pipedrive($token);
202 202
                 $orgId = $pipedrive->organizations->add(['name'=>$user->company])->getContent()->data->id;
Please login to merge, or discard this patch.
app/Http/Controllers/Product/BaseProductController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,7 +125,8 @@  discard block
 block discarded – undo
125 125
 
126 126
             $plan = new Plan();
127 127
             $plans = $plan->where('product', $productid)->pluck('name', 'id')->toArray();
128
-            if (count($plans) > 0) {//If Plan Exist For A product, Display Dropdown for Plans
128
+            if (count($plans) > 0) {
129
+//If Plan Exist For A product, Display Dropdown for Plans
129 130
                 $field = "<div>
130 131
                         <label class='required'>"./* @scrutinizer ignore-type */
131 132
                         \Lang::get('message.subscription').'</label>
@@ -136,7 +137,8 @@  discard block
 block discarded – undo
136 137
                             ['class' => 'form-control required', 'id' => 'plan', 'onchange' => 'getPrice(this.value)']
137 138
                         ).'
138 139
                 </div>';
139
-            } else {//If No Plan Exist For A Product
140
+            } else {
141
+//If No Plan Exist For A Product
140 142
                 $userid = $request->input('user');
141 143
                 $price = $controller->cost($productid, $userid);
142 144
             }
@@ -201,7 +203,8 @@  discard block
 block discarded – undo
201 203
 
202 204
     public function getRelease($owner, $repository, $order_id, $file)
203 205
     {
204
-        if ($owner && $repository) {//If the Product is downloaded from Github
206
+        if ($owner && $repository) {
207
+//If the Product is downloaded from Github
205 208
             $github_controller = new \App\Http\Controllers\Github\GithubController();
206 209
             $relese = $github_controller->listRepositories($owner, $repository, $order_id);
207 210
 
Please login to merge, or discard this patch.
app/Http/Controllers/Product/AddonController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
     {
161 161
         try {
162 162
             $ids = $request->input('select');
163
-            if (! empty($ids)) {
163
+            if (!empty($ids)) {
164 164
                 foreach ($ids as $id) {
165 165
                     $addon = $this->addon->where('id', $id)->first();
166 166
                     if ($addon) {
Please login to merge, or discard this patch.
app/Http/Controllers/Product/CategoryController.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -55,21 +55,21 @@
 block discarded – undo
55 55
             $allCategories = $this->productCategory->select('id', 'category_name')->get();
56 56
 
57 57
             return \DataTables::of($allCategories)
58
-         ->addColumn('checkbox', function ($model) {
59
-             return "<input type='checkbox' class='category_checkbox' 
58
+            ->addColumn('checkbox', function ($model) {
59
+                return "<input type='checkbox' class='category_checkbox' 
60 60
             value=".$model->id.' name=select[] id=check>';
61
-         })
62
-         ->addColumn('category_name', function ($model) {
63
-             return ucfirst($model->category_name);
64
-         })
65
-         ->addColumn('action', function ($model) {
66
-             return "<p><button data-toggle='modal' 
61
+            })
62
+            ->addColumn('category_name', function ($model) {
63
+                return ucfirst($model->category_name);
64
+            })
65
+            ->addColumn('action', function ($model) {
66
+                return "<p><button data-toggle='modal' 
67 67
              data-id=".$model->id." data-name= '$model->category_name' 
68 68
              class='btn btn-sm btn-secondary btn-xs editCat'".tooltip('Edit')."<i class='fa fa-edit'
69 69
              style='color:white;'> </i></button>&nbsp;</p>";
70
-         })
71
-         ->rawColumns(['checkbox', 'category_name', 'action'])
72
-         ->make(true);
70
+            })
71
+            ->rawColumns(['checkbox', 'category_name', 'action'])
72
+            ->make(true);
73 73
         } catch (\Exception $ex) {
74 74
             return redirect()->back()->with('fails', $ex->getMessage());
75 75
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
             $allCategories = $this->productCategory->select('id', 'category_name')->get();
56 56
 
57 57
             return \DataTables::of($allCategories)
58
-         ->addColumn('checkbox', function ($model) {
58
+         ->addColumn('checkbox', function($model) {
59 59
              return "<input type='checkbox' class='category_checkbox' 
60 60
             value=".$model->id.' name=select[] id=check>';
61 61
          })
62
-         ->addColumn('category_name', function ($model) {
62
+         ->addColumn('category_name', function($model) {
63 63
              return ucfirst($model->category_name);
64 64
          })
65
-         ->addColumn('action', function ($model) {
65
+         ->addColumn('action', function($model) {
66 66
              return "<p><button data-toggle='modal' 
67 67
              data-id=".$model->id." data-name= '$model->category_name' 
68 68
              class='btn btn-sm btn-secondary btn-xs editCat'".tooltip('Edit')."<i class='fa fa-edit'
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     {
101 101
         try {
102 102
             $ids = $request->input('select');
103
-            if (! empty($ids)) {
103
+            if (!empty($ids)) {
104 104
                 foreach ($ids as $id) {
105 105
                     if ($id != 1) {
106 106
                         $category = $this->productCategory->where('id', $id)->first();
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                             ->addColumn('name', function ($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
129
-                                  // return $model->image;
130
-                                  return "<img src= '$model->image' + height=\"80\"/>";
131
-                              })
128
+                                ->addColumn('image', function ($model) {
129
+                                    // return $model->image;
130
+                                    return "<img src= '$model->image' + height=\"80\"/>";
131
+                                })
132 132
                             ->addColumn('type', function ($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
                 'version'      => 'required',
178 178
                 'filename'      => 'required',
179 179
             ],
180
-       ['filename.required' => 'Please Uplaod A file',
181
-       ]
180
+        ['filename.required' => 'Please Uplaod A file',
181
+        ]
182 182
         );
183 183
 
184 184
         try {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -118,25 +118,25 @@  discard block
 block discarded – undo
118 118
 
119 119
             return\ DataTables::of($new_product)
120 120
 
121
-                            ->addColumn('checkbox', function ($model) {
121
+                            ->addColumn('checkbox', function($model) {
122 122
                                 return "<input type='checkbox' class='product_checkbox' 
123 123
                                 value=".$model->id.' name=select[] id=check>';
124 124
                             })
125
-                            ->addColumn('name', function ($model) {
125
+                            ->addColumn('name', function($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
128
+                              ->addColumn('image', function($model) {
129 129
                                   // return $model->image;
130 130
                                   return "<img src= '$model->image' + height=\"80\"/>";
131 131
                               })
132
-                            ->addColumn('type', function ($model) {
132
+                            ->addColumn('type', function($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
135 135
                                 } else {
136 136
                                     return 'Not available';
137 137
                                 }
138 138
                             })
139
-                            ->addColumn('group', function ($model) {
139
+                            ->addColumn('group', function($model) {
140 140
                                 if ($this->group->where('id', $model->group)->first()) {
141 141
                                     return $this->group->where('id', $model->group)->first()->name;
142 142
                                 } else {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                                 }
145 145
                             })
146 146
 
147
-                            ->addColumn('Action', function ($model) {
147
+                            ->addColumn('Action', function($model) {
148 148
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
149 149
                                 $url = '';
150 150
                                 if ($permissions['downloadPermission'] == 1) {
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     {
454 454
         try {
455 455
             $ids = $request->input('select');
456
-            if (! empty($ids)) {
456
+            if (!empty($ids)) {
457 457
                 foreach ($ids as $id) {
458 458
                     $product = $this->product->where('id', $id)->first();
459 459
                     if ($product) {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
         try {
515 515
             $ids = $request->input('select');
516 516
             $storagePath = Setting::find(1)->value('file_storage');
517
-            if (! empty($ids)) {
517
+            if (!empty($ids)) {
518 518
                 foreach ($ids as $id) {
519 519
                     $product = $this->product_upload->where('id', $id)->first();
520 520
                     if ($product) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,8 @@  discard block
 block discarded – undo
192 192
             $this->product_upload->save();
193 193
             $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]);
194 194
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
195
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
195
+            if ($autoUpdateStatus == 1) {
196
+//If License Setting Status is on,Add Product to the License Manager
196 197
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
197 198
                 $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), $request->input('filename'), '1');
198 199
             }
@@ -284,7 +285,8 @@  discard block
 block discarded – undo
284 285
 
285 286
         try {
286 287
             $licenseStatus = StatusSetting::pluck('license_status')->first();
287
-            if ($licenseStatus) { //If License Setting Status is on,Add Product to the License Manager
288
+            if ($licenseStatus) {
289
+//If License Setting Status is on,Add Product to the License Manager
288 290
                 $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']);
289 291
             }
290 292
             $updateCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
Please login to merge, or discard this patch.
app/Http/Controllers/Product/PlanController.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -87,22 +87,22 @@  discard block
 block discarded – undo
87 87
 
88 88
                             return ucfirst($response);
89 89
                         })
90
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
91
-                             $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
90
+                            ->addColumn('price', function ($model) use ($defaultCurrency) {
91
+                                $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
92 92
                             ->pluck('add_price')->first();
93
-                             if ($price != null) {
94
-                                 return $price;
95
-                             } else {
96
-                                 return 'Not Available';
97
-                             }
98
-                         })
99
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
100
-                             if ($defaultCurrency && $defaultCurrency != null) {
101
-                                 return $defaultCurrency;
102
-                             } else {
103
-                                 return 'Not Available';
104
-                             }
105
-                         })
93
+                                if ($price != null) {
94
+                                    return $price;
95
+                                } else {
96
+                                    return 'Not Available';
97
+                                }
98
+                            })
99
+                            ->addColumn('currency', function ($model) use ($defaultCurrency) {
100
+                                if ($defaultCurrency && $defaultCurrency != null) {
101
+                                    return $defaultCurrency;
102
+                                } else {
103
+                                    return 'Not Available';
104
+                                }
105
+                            })
106 106
                         ->addColumn('action', function ($model) {
107 107
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
108 108
                             class='btn btn-sm btn-secondary btn-xs'".tooltip('Edit')."<i class='fa fa-edit' 
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
         $agentQuantity = $plan->planPrice->first()->no_of_agents;
207 207
         foreach ($products as $key => $product) {
208 208
             $selectedProduct = $this->product->where('id', $plan->product)
209
-          ->pluck('name', 'id', 'subscription')->toArray();
209
+            ->pluck('name', 'id', 'subscription')->toArray();
210 210
         }
211 211
         $selectedPeriods = $this->period->where('days', $plan->days)
212
-       ->pluck('name', 'days')->toArray();
212
+        ->pluck('name', 'days')->toArray();
213 213
 
214 214
         return view(
215 215
             'themes.default1.product.plan.edit',
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         $defaultCurrency = Setting::where('id', 1)->value('default_currency');
62 62
 
63 63
         return\ DataTables::of($new_plan)
64
-                        ->addColumn('checkbox', function ($model) {
64
+                        ->addColumn('checkbox', function($model) {
65 65
                             return "<input type='checkbox' class='plan_checkbox' 
66 66
                             value=".$model->id.' name=select[] id=check>';
67 67
                         })
68
-                        ->addColumn('name', function ($model) {
68
+                        ->addColumn('name', function($model) {
69 69
                             return ucfirst($model->name);
70 70
                         })
71
-                        ->addColumn('days', function ($model) {
71
+                        ->addColumn('days', function($model) {
72 72
                             if ($model->days != '') {
73 73
                                 $months = $model->days / 30;
74 74
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                             return 'Not Available';
79 79
                         })
80
-                        ->addColumn('product', function ($model) {
80
+                        ->addColumn('product', function($model) {
81 81
                             $productid = $model->product;
82 82
                             $product = $this->product->where('id', $productid)->first();
83 83
                             $response = '';
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
                             return ucfirst($response);
89 89
                         })
90
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
90
+                         ->addColumn('price', function($model) use ($defaultCurrency) {
91 91
                              $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
92 92
                             ->pluck('add_price')->first();
93 93
                              if ($price != null) {
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
                                  return 'Not Available';
97 97
                              }
98 98
                          })
99
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
99
+                         ->addColumn('currency', function($model) use ($defaultCurrency) {
100 100
                              if ($defaultCurrency && $defaultCurrency != null) {
101 101
                                  return $defaultCurrency;
102 102
                              } else {
103 103
                                  return 'Not Available';
104 104
                              }
105 105
                          })
106
-                        ->addColumn('action', function ($model) {
106
+                        ->addColumn('action', function($model) {
107 107
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
108 108
                             class='btn btn-sm btn-secondary btn-xs'".tooltip('Edit')."<i class='fa fa-edit' 
109 109
                             style='color:white;'> </i></a>";
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     public function destroy(Request $request)
300 300
     {
301 301
         $ids = $request->input('select');
302
-        if (! empty($ids)) {
302
+        if (!empty($ids)) {
303 303
             foreach ($ids as $id) {
304 304
                 $plan = $this->plan->where('id', $id)->first();
305 305
                 if ($plan) {
Please login to merge, or discard this patch.
app/Http/Controllers/Product/GroupController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@
 block discarded – undo
52 52
         return\ DataTables::of($product_group)
53 53
         // return \Datatable::of($this->group->select('id', 'name')->get())
54 54
 
55
-                       ->addColumn('checkbox', function ($model) {
56
-                           return "<input type='checkbox' class='group_checkbox' 
55
+                        ->addColumn('checkbox', function ($model) {
56
+                            return "<input type='checkbox' class='group_checkbox' 
57 57
                             value=".$model->id.' name=select[] id=check>';
58
-                       })
58
+                        })
59 59
 
60 60
                         ->addColumn('name', function ($model) {
61 61
                             return ucfirst($model->name);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,22 +52,22 @@  discard block
 block discarded – undo
52 52
         return\ DataTables::of($product_group)
53 53
         // return \Datatable::of($this->group->select('id', 'name')->get())
54 54
 
55
-                       ->addColumn('checkbox', function ($model) {
55
+                       ->addColumn('checkbox', function($model) {
56 56
                            return "<input type='checkbox' class='group_checkbox' 
57 57
                             value=".$model->id.' name=select[] id=check>';
58 58
                        })
59 59
 
60
-                        ->addColumn('name', function ($model) {
60
+                        ->addColumn('name', function($model) {
61 61
                             return ucfirst($model->name);
62 62
                         })
63 63
                         // ->showColumns('name')
64 64
 
65
-                        ->addColumn('action', function ($model) {
65
+                        ->addColumn('action', function($model) {
66 66
                             return '<a href='.url('groups/'.$model->id.'/edit').
67 67
                             " class='btn btn-sm btn-secondary btn-xs'".tooltip('Edit')."<i class='fa fa-edit' 
68 68
                             style='color:white;'> </i></a>";
69 69
                         })
70
-                        ->rawColumns(['checkbox', 'name',  'action'])
70
+                        ->rawColumns(['checkbox', 'name', 'action'])
71 71
                         ->make(true);
72 72
     }
73 73
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         try {
161 161
             $ids = $request->input('select');
162
-            if (! empty($ids)) {
162
+            if (!empty($ids)) {
163 163
                 foreach ($ids as $id) {
164 164
                     $group = $this->group->where('id', $id)->first();
165 165
 
Please login to merge, or discard this patch.
app/Http/Controllers/Installer/DatabaseController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
             $response = $this->migrateAndSeed();
24 24
 
25 25
             return redirect()->route('AgoraInstaller::final')
26
-                         ->with(['message' => $response]);
26
+                            ->with(['message' => $response]);
27 27
         } catch (\Exception $ex) {
28 28
             return redirect()->route('AgoraInstaller::environmentWizard')
29
-                         ->with(['fails' =>$ex->getMessage()]);
29
+                            ->with(['fails' =>$ex->getMessage()]);
30 30
         }
31 31
     }
32 32
 
Please login to merge, or discard this patch.