Passed
Push — master ( 09d1b8...8ab156 )
by Curtis
08:07
created
app/Traits/TenantConnectionResolver.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
 {
10 10
     public function getConnectionName()
11 11
     {
12
-        if (! App::runningUnitTests() && Auth::check()) {
12
+        if (!App::runningUnitTests() && Auth::check()) {
13 13
             $user = \Auth::user();
14 14
             $role_id = $user->role_id;
15 15
             if ($user->isAdmin()) {
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function redirectToProvider($provider)
55 55
     {
56 56
         $validated = $this->validateProvider($provider);
57
-        if (! is_null($validated)) {
57
+        if (!is_null($validated)) {
58 58
             return $validated;
59 59
         }
60 60
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         $curUser = User::where('email', $user->getEmail())->first();
79 79
 
80
-        if (! $curUser) {
80
+        if (!$curUser) {
81 81
             try {
82 82
                 // create person
83 83
                 $person = new Person();
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
     public function needsToCreateSocial(User $user, $service)
152 152
     {
153
-        return ! $user->hasSocialLinked($service);
153
+        return !$user->hasSocialLinked($service);
154 154
     }
155 155
 
156 156
     public function unique_random($table, $col, $chars = 16)
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             // If unique is still false at this point
187 187
             // it will just repeat all the steps until
188 188
             // it has generated a random string of characters
189
-        } while (! $unique);
189
+        } while (!$unique);
190 190
 
191 191
         return $random;
192 192
     }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $this->user = $this->loggableUser($request);
212 212
 
213
-        if (! $this->user) {
213
+        if (!$this->user) {
214 214
             return false;
215 215
         }
216 216
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             'password' => 'required|string',
261 261
         ];
262 262
 
263
-        if (! $request->attributes->get('sanctum')) {
263
+        if (!$request->attributes->get('sanctum')) {
264 264
             $attributes['device_name'] = 'required|string';
265 265
         }
266 266
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     protected function validateProvider($provider)
275 275
     {
276
-        if (! in_array($provider, ['facebook', 'google', 'github'])) {
276
+        if (!in_array($provider, ['facebook', 'google', 'github'])) {
277 277
             return response()->json(['error' => 'Please login using facebook or google or github'], 422);
278 278
         }
279 279
     }
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
     {
311 311
         $user = User::whereEmail($request->input('email'))->first();
312 312
 
313
-        if (! optional($user)->currentPasswordIs($request->input('password'))) {
313
+        if (!optional($user)->currentPasswordIs($request->input('password'))) {
314 314
             return;
315 315
         }
316 316
 
317
-        if (! $user->email) {
317
+        if (!$user->email) {
318 318
             throw ValidationException::withMessages([
319 319
                 'email' => 'Email does not exist.',
320 320
             ]);
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             ]);
332 332
         }
333 333
 
334
-        if (! App::runningUnitTests()) {
334
+        if (!App::runningUnitTests()) {
335 335
             $company = $user->person->company();
336 336
             //            \Log::debug('Login----------------------'.$company);
337 337
             $tenant = false;
@@ -340,25 +340,25 @@  discard block
 block discarded – undo
340 340
             }
341 341
             // set company id as default
342 342
             $main_company = $user->person->company();
343
-            if ($main_company !== null && ! $user->isAdmin()) {
343
+            if ($main_company !== null && !$user->isAdmin()) {
344 344
                 $c_id = $main_company->id;
345 345
             }
346
-            if (! $user->isAdmin()) {
346
+            if (!$user->isAdmin()) {
347 347
                 $tenants = Tenant::find($main_company->id);
348 348
             }
349 349
             if ($user->isAdmin()) {
350 350
                 $tenants = null;
351 351
             }
352
-            if ($main_company === null && ! $user->isAdmin()) {
352
+            if ($main_company === null && !$user->isAdmin()) {
353 353
                 //   if (($main_company == null||$tenants=='') && ! $user->isAdmin()) {
354 354
                 //   if ($main_company == null) {
355 355
                 $this->create_company($user);
356
-            } elseif ($tenants && ! $user->isAdmin()) {
356
+            } elseif ($tenants && !$user->isAdmin()) {
357 357
                 //                    $c = DB::connection('tenantdb',$tenants->tenancy_db_name)->table('users')->count();
358 358
                 $company = \App\Models\Company::find($main_company->id);
359 359
                 //                    \Log::debug('Database----------------------'.$main_company->id);
360 360
                 tenancy()->initialize($tenants);
361
-                $tenants->run(function () use ($company, $user) {
361
+                $tenants->run(function() use ($company, $user) {
362 362
                     //  $company->save();
363 363
                     $c = User::count();
364 364
                     if ($c === 0) {
@@ -385,11 +385,11 @@  discard block
 block discarded – undo
385 385
         }
386 386
         // set company id as default
387 387
         $main_company = $user->person->company();
388
-        if ($main_company !== null && ! $user->isAdmin()) {
388
+        if ($main_company !== null && !$user->isAdmin()) {
389 389
             $c_id = $main_company->id.$user->id;
390 390
         }
391 391
 
392
-        if ($main_company === null && ! $user->isAdmin()) {
392
+        if ($main_company === null && !$user->isAdmin()) {
393 393
             //          if ($main_company == null) {
394 394
             $this->create_company($user);
395 395
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Trees/Show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
             ];
82 82
             foreach ($partners as $partner) {
83 83
                 $p = Person::find($partner);
84
-                if (isset($p) && ! isset($this->persons[$partner])) {
84
+                if (isset($p) && !isset($this->persons[$partner])) {
85 85
                     $this->persons[$partner] = $p;
86 86
                 }
87 87
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Stripe/GetPlans.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
         $result = [];
25 25
         foreach ($plans as $plan) {
26
-            if (! $plan->active || $plan->amount == 0) {
26
+            if (!$plan->active || $plan->amount == 0) {
27 27
                 continue;
28 28
             }
29 29
 
Please login to merge, or discard this patch.
app/Http/Controllers/Stripe/Subscribe.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         if ($request->has('payment_method')) {
29 29
             $paymentMethod = $request->payment_method;
30 30
             $subscription = $user->newSubscription('default', $plan_id)
31
-                                 ->trialDays(14);
31
+                                    ->trialDays(14);
32 32
             if ($couponId = $request->input('coupon_id')) {
33 33
                 $subscription->withCoupon($couponId);
34 34
             }
Please login to merge, or discard this patch.