Passed
Pull Request — master (#2397)
by
unknown
25:01 queued 16:43
created
app/Jobs/ExportGedCom.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 //        Log::info("content from getGedcomPerson function => \n $content");
69 69
         // var_dump(\Storage::disk('public')->path($this->file), "job");
70 70
         $manager->storage()->put($this->file, $content);
71
- //       $filePath = 'public/' . $this->file;
71
+    //       $filePath = 'public/' . $this->file;
72 72
 //        $filePath = $manager->storage()->path($filePath);
73 73
         //	chmod_r('/home/genealogia/domains/api.genealogia.co.uk/genealogy/storage/tenants/');
74 74
         exec('chmod -R 0777 '.storage_path('/tenants/'));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     public function handle()
37 37
     {
38 38
         $p_id = $this->user->person_id; // person_id
39
-        $f_id = 0;                      // family_id
39
+        $f_id = 0; // family_id
40 40
 
41 41
         $tenant = Manager::fromModel($this->user->company(), $this->user);
42 42
         $tenant->connect();
Please login to merge, or discard this patch.
app/Jobs/ImportGedcom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         throw_unless(File::isFile($this->filePath), \Exception::class, "{$this->filePath} does not exist.");
31 31
 
32 32
         $tenant = Manager::fromModel($this->user->company(), $this->user);
33
-        if (! $tenant->databaseExists()) {
33
+        if (!$tenant->databaseExists()) {
34 34
             //$tenant->dropDatabase();
35 35
             $tenant->createDatabase();
36 36
             $tenant->connect();
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
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function redirectToProvider($provider)
51 51
     {
52 52
         $validated = $this->validateProvider($provider);
53
-        if (! is_null($validated)) {
53
+        if (!is_null($validated)) {
54 54
             return $validated;
55 55
         }
56 56
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $curUser = User::where('email', $user->getEmail())->first();
75 75
 
76
-        if (! $curUser) {
76
+        if (!$curUser) {
77 77
             try {
78 78
                 // create person
79 79
                 $person = new Person();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 
147 147
     public function needsToCreateSocial(User $user, $service)
148 148
     {
149
-        return ! $user->hasSocialLinked($service);
149
+        return !$user->hasSocialLinked($service);
150 150
     }
151 151
 
152 152
     public function unique_random($table, $col, $chars = 16)
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             // If unique is still false at this point
183 183
             // it will just repeat all the steps until
184 184
             // it has generated a random string of characters
185
-        } while (! $unique);
185
+        } while (!$unique);
186 186
 
187 187
         return $random;
188 188
     }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     {
207 207
         $this->user = $this->loggableUser($request);
208 208
 
209
-        if (! $this->user) {
209
+        if (!$this->user) {
210 210
             return false;
211 211
         }
212 212
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             'password' => 'required|string',
257 257
         ];
258 258
 
259
-        if (! $request->attributes->get('sanctum')) {
259
+        if (!$request->attributes->get('sanctum')) {
260 260
             $attributes['device_name'] = 'required|string';
261 261
         }
262 262
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      */
270 270
     protected function validateProvider($provider)
271 271
     {
272
-        if (! in_array($provider, ['facebook', 'google', 'github'])) {
272
+        if (!in_array($provider, ['facebook', 'google', 'github'])) {
273 273
             return response()->json(['error' => 'Please login using facebook or google or github'], 422);
274 274
         }
275 275
     }
@@ -311,11 +311,11 @@  discard block
 block discarded – undo
311 311
     {
312 312
         $user = User::whereEmail($request->input('email'))->first();
313 313
 
314
-        if (! optional($user)->currentPasswordIs($request->input('password'))) {
314
+        if (!optional($user)->currentPasswordIs($request->input('password'))) {
315 315
             return;
316 316
         }
317 317
 
318
-        if (! $user->email) {
318
+        if (!$user->email) {
319 319
             throw ValidationException::withMessages([
320 320
                 'email' => 'Email does not exist.',
321 321
             ]);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             ]);
333 333
         }
334 334
 
335
-        if (! App::runningUnitTests()) {
335
+        if (!App::runningUnitTests()) {
336 336
             $company = $user->person->company();
337 337
             //            \Log::debug('Login----------------------'.$company);
338 338
             $tenant = false;
@@ -341,27 +341,27 @@  discard block
 block discarded – undo
341 341
             }
342 342
             // set company id as default
343 343
             $main_company = $user->person->company();
344
-            if ($main_company !== null && ! $user->isAdmin()) {
344
+            if ($main_company !== null && !$user->isAdmin()) {
345 345
                 $c_id = $main_company->id;
346 346
             }
347
-            if (! $user->isAdmin()) {
347
+            if (!$user->isAdmin()) {
348 348
                 $tenants = Tenant::find($main_company->id);
349 349
             }
350 350
             if ($user->isAdmin()) {
351 351
                 $tenants = null;
352 352
             }
353
-            if ($main_company === null && ! $user->isAdmin()) {
353
+            if ($main_company === null && !$user->isAdmin()) {
354 354
                 //   if (($main_company == null||$tenants=='') && ! $user->isAdmin()) {
355 355
                 //   if ($main_company == null) {
356 356
                 $this->create_company($user);
357 357
             } else {
358
-                if ($tenants && ! $user->isAdmin()) {
358
+                if ($tenants && !$user->isAdmin()) {
359 359
                     //                    $c = DB::connection('tenantdb',$tenants->tenancy_db_name)->table('users')->count();
360 360
                     $company = \App\Models\Company::find($main_company->id);
361 361
                     //                    \Log::debug('Database----------------------'.$main_company->id);
362 362
 
363 363
                     tenancy()->initialize($tenants);
364
-                    $tenants->run(function () use ($company, $user) {
364
+                    $tenants->run(function() use ($company, $user) {
365 365
                         //  $company->save();
366 366
                         $c = User::count();
367 367
                         if ($c === 0) {
@@ -390,11 +390,11 @@  discard block
 block discarded – undo
390 390
         }
391 391
         // set company id as default
392 392
         $main_company = $user->person->company();
393
-        if ($main_company !== null && ! $user->isAdmin()) {
393
+        if ($main_company !== null && !$user->isAdmin()) {
394 394
             $c_id = $main_company->id.$user->id;
395 395
         }
396 396
 
397
-        if ($main_company === null && ! $user->isAdmin()) {
397
+        if ($main_company === null && !$user->isAdmin()) {
398 398
             //          if ($main_company == null) {
399 399
             $this->create_company($user);
400 400
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Stripe/VerifyCoupon.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
         try {
22 22
             $user->createAsStripeCustomer();
23
-        } catch(\Exception $e) {
23
+        } catch (\Exception $e) {
24 24
         }
25 25
 
26 26
         $couponCode = $request->input('coupon_code');
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 $k => $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.