Test Setup Failed
Push — master ( b09c63...5e2d80 )
by Curtis
17:19 queued 11:03
created
app/Http/Controllers/PersonAnciController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['group', 'anci'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if (! empty($search_term)) {
23
-                $searchQuery = '%'.$search_term.'%';
22
+            if (!empty($search_term)) {
23
+                $searchQuery = '%' . $search_term . '%';
24 24
                 foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $filters = get_object_vars(json_decode($request->columnFilters));
32 32
 
33 33
             foreach ($filters as $key => $value) {
34
-                if (! empty($value)) {
35
-                    $query->orWhere($key, 'like', '%'.$value.'%');
34
+                if (!empty($value)) {
35
+                    $query->orWhere($key, 'like', '%' . $value . '%');
36 36
                 }
37 37
             }
38 38
         }
Please login to merge, or discard this patch.
app/Http/Controllers/ForumTopicController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['title', 'email', 'phone'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if (! empty($search_term)) {
23
-                $searchQuery = '%'.$search_term.'%';
22
+            if (!empty($search_term)) {
23
+                $searchQuery = '%' . $search_term . '%';
24 24
                 foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $filters = get_object_vars(json_decode($request->columnFilters));
32 32
 
33 33
             foreach ($filters as $key => $value) {
34
-                if (! empty($value)) {
35
-                    $query->orWhere($key, 'like', '%'.$value.'%');
34
+                if (!empty($value)) {
35
+                    $query->orWhere($key, 'like', '%' . $value . '%');
36 36
                 }
37 37
             }
38 38
         }
Please login to merge, or discard this patch.
app/Http/Controllers/LoginController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function redirectToProvider($provider)
36 36
     {
37 37
         $validated = $this->validateProvider($provider);
38
-        if (! is_null($validated)) {
38
+        if (!is_null($validated)) {
39 39
             return $validated;
40 40
         }
41 41
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function handleProviderCallback($provider)
52 52
     {
53 53
         $validated = $this->validateProvider($provider);
54
-        if (! is_null($validated)) {
54
+        if (!is_null($validated)) {
55 55
             return $validated;
56 56
         }
57 57
         try {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     protected function validateProvider($provider)
92 92
     {
93
-        if (! in_array($provider, ['facebook', 'google'])) {
93
+        if (!in_array($provider, ['facebook', 'google'])) {
94 94
             return response()->json(['error' => 'Please login using facebook or google'], 422);
95 95
         }
96 96
     }
Please login to merge, or discard this patch.
app/Http/Controllers/FamilyEventController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
         if ($request->has('searchTerm')) {
24 24
             $columnsToSearch = ['family_id', 'places_id', 'date', 'title', 'description', 'year', 'month', 'day', 'type', 'plac', 'phon', 'caus', 'age', 'agnc', 'husb', 'wife', 'converted_date', 'addr_id'];
25 25
             $search_term = json_decode($request->searchTerm)->searchTerm;
26
-            if (! empty($search_term)) {
27
-                $searchQuery = '%'.$search_term.'%';
26
+            if (!empty($search_term)) {
27
+                $searchQuery = '%' . $search_term . '%';
28 28
                 foreach ($columnsToSearch as $column) {
29 29
                     $query->orWhere($column, 'LIKE', $searchQuery);
30 30
                 }
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
             $filters = get_object_vars(json_decode($request->columnFilters));
36 36
 
37 37
             foreach ($filters as $key => $value) {
38
-                if (! empty($value)) {
39
-                    $query->orWhere($key, 'like', '%'.$value.'%');
38
+                if (!empty($value)) {
39
+                    $query->orWhere($key, 'like', '%' . $value . '%');
40 40
                 }
41 41
             }
42 42
         }
Please login to merge, or discard this patch.
app/Http/Controllers/PersonController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['title', 'name', 'appellative', 'uid', 'email', 'phone', 'birthday', 'deathday', 'bank', 'bank_account', 'obs', 'givn', 'surn', 'type', 'npfx', 'nick', 'spfx', 'nsfx', 'secx', 'description', 'child_in_family_id', 'chan', 'rin', 'resn', 'rfn', 'afn'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if (! empty($search_term)) {
23
-                $searchQuery = '%'.$search_term.'%';
22
+            if (!empty($search_term)) {
23
+                $searchQuery = '%' . $search_term . '%';
24 24
                 foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $filters = get_object_vars(json_decode($request->columnFilters));
32 32
 
33 33
             foreach ($filters as $key => $value) {
34
-                if (! empty($value)) {
35
-                    $query->orWhere($key, 'like', '%'.$value.'%');
34
+                if (!empty($value)) {
35
+                    $query->orWhere($key, 'like', '%' . $value . '%');
36 36
                 }
37 37
             }
38 38
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         if ($request->has('perPage')) {
46 46
             $rows = $query->paginate($request->perPage);
47 47
         }
48
-        if (! count($request->all())) {
48
+        if (!count($request->all())) {
49 49
             $rows = $query->get()->toArray();
50 50
         }
51 51
 
Please login to merge, or discard this patch.
app/Http/Controllers/TreeController.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
         if ($request->has('searchTerm')) {
34 34
             $columnsToSearch = ['name'];
35 35
             $search_term = json_decode($request->searchTerm)->searchTerm;
36
-            if (! empty($search_term)) {
37
-                $searchQuery = '%'.$search_term.'%';
36
+            if (!empty($search_term)) {
37
+                $searchQuery = '%' . $search_term . '%';
38 38
                 foreach ($columnsToSearch as $column) {
39 39
                     $query->orWhere($column, 'LIKE', $searchQuery);
40 40
                 }
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
             $filters = get_object_vars(json_decode($request->columnFilters));
46 46
 
47 47
             foreach ($filters as $key => $value) {
48
-                if (! empty($value)) {
49
-                    $query->orWhere($key, 'like', '%'.$value.'%');
48
+                if (!empty($value)) {
49
+                    $query->orWhere($key, 'like', '%' . $value . '%');
50 50
                 }
51 51
             }
52 52
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if ($request->has('perPage')) {
64 64
             $rows = $query->paginate($request->perPage);
65 65
         }
66
-        if (! count($request->all())) {
66
+        if (!count($request->all())) {
67 67
             $rows = $query->get()->toArray();
68 68
         }
69 69
 
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
         ])->id;
121 121
 
122 122
         $tenant_id = DB::connection($this->getConnectionName())->table('tenants')->insertGetId([
123
-            'name' => 'tenant'.$tree_id,
123
+            'name' => 'tenant' . $tree_id,
124 124
             'tree_id' => $tree_id,
125
-            'database' => 'tenant'.$tree_id,
125
+            'database' => 'tenant' . $tree_id,
126 126
         ]);
127 127
 
128
-        DB::statement('create database tenant'.$tree_id);
128
+        DB::statement('create database tenant' . $tree_id);
129 129
 
130 130
         Artisan::call('tenants:artisan "migrate --database=tenant --force"');
131 131
     }
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
                     $_families = Family::on($conn)->where('husband_id', $father->id)->orwhere('wife_id', $father->id)->select('id')->get();
184 184
                     $_union_ids = [];
185 185
                     foreach ($_families as $item) {
186
-                        $_union_ids[] = 'u'.$item->id;
186
+                        $_union_ids[] = 'u' . $item->id;
187 187
                     }
188 188
                     $father->setAttribute('own_unions', $_union_ids);
189 189
                     $this->persons[$father->id] = $father;
190
-                    $this->links[] = [$father->id, 'u'.$family_id];
190
+                    $this->links[] = [$father->id, 'u' . $family_id];
191 191
                 }
192 192
                 if (isset($mother->id)) {
193 193
                     $_families = Family::on($conn)->where('husband_id', $mother->id)->orwhere('wife_id', $mother->id)->select('id')->get();
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                     }
198 198
                     $mother->setAttribute('own_unions', $_union_ids);
199 199
                     $this->persons[$mother->id] = $mother;
200
-                    $this->links[] = [$mother->id, 'u'.$family_id];
200
+                    $this->links[] = [$mother->id, 'u' . $family_id];
201 201
                 }
202 202
 
203 203
                 // find children
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                     $this->persons[$child_id] = $child_data;
218 218
 
219 219
                     // add union-child link
220
-                    $this->links[] = ['u'.$family_id, $child_id];
220
+                    $this->links[] = ['u' . $family_id, $child_id];
221 221
 
222 222
                     // make union child filds
223 223
                     $children_ids[] = $child_id;
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 
227 227
                 // compose union item and add to unions
228 228
                 $union = [];
229
-                $union['id'] = 'u'.$family_id;
229
+                $union['id'] = 'u' . $family_id;
230 230
                 $union['partner'] = [isset($father->id) ? $father->id : null, isset($mother->id) ? $mother->id : null];
231 231
                 $union['children'] = $children_ids;
232
-                $this->unions['u'.$family_id] = $union;
232
+                $this->unions['u' . $family_id] = $union;
233 233
             }
234 234
         }
235 235
 
@@ -255,27 +255,27 @@  discard block
 block discarded – undo
255 255
                 return;
256 256
             }
257 257
             // do self
258
-            if (! array_key_exists($start_id, $this->persons)) {
258
+            if (!array_key_exists($start_id, $this->persons)) {
259 259
                 // this is not added
260 260
                 $_families = Family::on($conn)->where('husband_id', $start_id)->orwhere('wife_id', $start_id)->select('id')->get();
261 261
                 $_union_ids = [];
262 262
                 foreach ($_families as $item) {
263
-                    $_union_ids[] = 'u'.$item->id;
263
+                    $_union_ids[] = 'u' . $item->id;
264 264
                     // add current family link
265 265
                     // $this->links[] = [$start_id, 'u'.$item->id];
266
-                    array_unshift($this->links, [$start_id, 'u'.$item->id]);
266
+                    array_unshift($this->links, [$start_id, 'u' . $item->id]);
267 267
                 }
268 268
                 $person->setAttribute('own_unions', $_union_ids);
269
-                $person->setAttribute('parent_union', 'u'.$person->child_in_family_id);
269
+                $person->setAttribute('parent_union', 'u' . $person->child_in_family_id);
270 270
                 // add to persons
271 271
                 $this->persons[$start_id] = $person;
272 272
 
273 273
                 // get self's parents data
274 274
                 $p_family_id = $person->child_in_family_id;
275
-                if (! empty($p_family_id)) {
275
+                if (!empty($p_family_id)) {
276 276
                     // add parent family link
277 277
                     // $this->links[] = ['u'.$p_family_id,  $start_id] ;
278
-                    array_unshift($this->links, ['u'.$p_family_id,  $start_id]);
278
+                    array_unshift($this->links, ['u' . $p_family_id, $start_id]);
279 279
                     $p_family = Family::on($conn)->find($p_family_id);
280 280
                     if (isset($p_family->husband_id)) {
281 281
                         $p_fatherid = $p_family->husband_id;
@@ -294,27 +294,27 @@  discard block
 block discarded – undo
294 294
                 $father = Person::on($conn)->find($family->husband_id);
295 295
                 $mother = Person::on($conn)->find($family->wife_id);
296 296
                 if (isset($father->id)) {
297
-                    if (! array_key_exists($father->id, $this->persons)) {
297
+                    if (!array_key_exists($father->id, $this->persons)) {
298 298
                         // this is not added
299 299
                         $_families = Family::on($conn)->where('husband_id', $father->id)->orwhere('wife_id', $father->id)->select('id')->get();
300 300
                         $_union_ids = [];
301 301
                         foreach ($_families as $item) {
302
-                            $_union_ids[] = 'u'.$item->id;
302
+                            $_union_ids[] = 'u' . $item->id;
303 303
                         }
304 304
                         $father->setAttribute('own_unions', $_union_ids);
305
-                        $father->setAttribute('parent_union', 'u'.$father->child_in_family_id);
305
+                        $father->setAttribute('parent_union', 'u' . $father->child_in_family_id);
306 306
                         // add to persons
307 307
                         $this->persons[$father->id] = $father;
308 308
 
309 309
                         // add current family link
310 310
                         // $this->links[] = [$father->id, 'u'.$family_id];
311
-                        array_unshift($this->links, [$father->id, 'u'.$family_id]);
311
+                        array_unshift($this->links, [$father->id, 'u' . $family_id]);
312 312
                         // get husband's parents data
313 313
                         $p_family_id = $father->child_in_family_id;
314
-                        if (! empty($p_family_id)) {
314
+                        if (!empty($p_family_id)) {
315 315
                             // add parent family link
316 316
                             // $this->links[] = ['u'.$p_family_id,  $father->id] ;
317
-                            array_unshift($this->links, ['u'.$p_family_id,  $father->id]);
317
+                            array_unshift($this->links, ['u' . $p_family_id, $father->id]);
318 318
                             $p_family = Family::on($conn)->find($p_family_id);
319 319
                             if (isset($p_family->husband_id)) {
320 320
                                 $p_fatherid = $p_family->husband_id;
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
                     }
329 329
                 }
330 330
                 if (isset($mother->id)) {
331
-                    if (! array_key_exists($mother->id, $this->persons)) {
331
+                    if (!array_key_exists($mother->id, $this->persons)) {
332 332
                         // this is not added
333 333
                         $_families = Family::on($conn)->where('husband_id', $mother->id)->orwhere('wife_id', $mother->id)->select('id')->get();
334 334
                         $_union_ids = [];
@@ -336,18 +336,18 @@  discard block
 block discarded – undo
336 336
                             $_union_ids[] = $item->id;
337 337
                         }
338 338
                         $mother->setAttribute('own_unions', $_union_ids);
339
-                        $mother->setAttribute('parent_union', 'u'.$mother->child_in_family_id);
339
+                        $mother->setAttribute('parent_union', 'u' . $mother->child_in_family_id);
340 340
                         // add to person
341 341
                         $this->persons[$mother->id] = $mother;
342 342
                         // add current family link
343 343
                         // $this->links[] = [$mother->id, 'u'.$family_id];
344
-                        array_unshift($this->links, [$mother->id, 'u'.$family_id]);
344
+                        array_unshift($this->links, [$mother->id, 'u' . $family_id]);
345 345
                         // get wifee's parents data
346 346
                         $p_family_id = $mother->child_in_family_id;
347
-                        if (! empty($p_family_id)) {
347
+                        if (!empty($p_family_id)) {
348 348
                             // add parent family link
349 349
                             // $this->links[] = ['u'.$p_family_id,  $father->id] ;
350
-                            array_unshift($this->links, ['u'.$p_family_id,  $mother->id]);
350
+                            array_unshift($this->links, ['u' . $p_family_id, $mother->id]);
351 351
 
352 352
                             $p_family = Family::on($conn)->find($p_family_id);
353 353
                             if (isset($p_family->husband_id)) {
@@ -372,10 +372,10 @@  discard block
 block discarded – undo
372 372
 
373 373
                 // compose union item and add to unions
374 374
                 $union = [];
375
-                $union['id'] = 'u'.$family_id;
375
+                $union['id'] = 'u' . $family_id;
376 376
                 $union['partner'] = [isset($father->id) ? $father->id : null, isset($mother->id) ? $mother->id : null];
377 377
                 $union['children'] = $children_ids;
378
-                $this->unions['u'.$family_id] = $union;
378
+                $this->unions['u' . $family_id] = $union;
379 379
             }
380 380
             // get brother/sisters
381 381
             $brothers = Person::on($conn)->where('child_in_family_id', $person->child_in_family_id)
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         $company_id = $request->get('company_id');
64 64
         $tree_id = $request->get('tree_id');
65
-        if (! empty($company_id) && ! empty($tree_id)) {
65
+        if (!empty($company_id) && !empty($tree_id)) {
66 66
             $user = auth()->user();
67 67
             $companies_id = $user->Company()->pluck('companies.id');
68 68
             $company = $user->Company()->update([
Please login to merge, or discard this patch.
app/Http/Controllers/SourceRepoController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['group', 'repo_id', 'caln'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if (! empty($search_term)) {
23
-                $searchQuery = '%'.$search_term.'%';
22
+            if (!empty($search_term)) {
23
+                $searchQuery = '%' . $search_term . '%';
24 24
                 foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
             $filters = get_object_vars(json_decode($request->columnFilters));
32 32
 
33 33
             foreach ($filters as $key => $value) {
34
-                if (! empty($value)) {
35
-                    $query->orWhere($key, 'like', '%'.$value.'%');
34
+                if (!empty($value)) {
35
+                    $query->orWhere($key, 'like', '%' . $value . '%');
36 36
                 }
37 37
             }
38 38
         }
Please login to merge, or discard this patch.
app/Http/Controllers/DnaController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
         if ($request->has('searchTerm')) {
22 22
             $columnsToSearch = ['name'];
23 23
             $search_term = json_decode($request->searchTerm)->searchTerm;
24
-            if (! empty($search_term)) {
25
-                $searchQuery = '%'.$search_term.'%';
24
+            if (!empty($search_term)) {
25
+                $searchQuery = '%' . $search_term . '%';
26 26
                 foreach ($columnsToSearch as $column) {
27 27
                     $query->orWhere($column, 'LIKE', $searchQuery);
28 28
                 }
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             $filters = get_object_vars(json_decode($request->columnFilters));
34 34
 
35 35
             foreach ($filters as $key => $value) {
36
-                if (! empty($value)) {
37
-                    $query->orWhere($key, 'like', '%'.$value.'%');
36
+                if (!empty($value)) {
37
+                    $query->orWhere($key, 'like', '%' . $value . '%');
38 38
                 }
39 39
             }
40 40
         }
@@ -73,15 +73,15 @@  discard block
 block discarded – undo
73 73
             if ($request->file('file')->isValid()) {
74 74
                 try {
75 75
                     $currentUser = Auth::user();
76
-                    $file_name = 'dna_'.$request->file('file')->getClientOriginalName().uniqid().'.'.$request->file('file')->extension();
76
+                    $file_name = 'dna_' . $request->file('file')->getClientOriginalName() . uniqid() . '.' . $request->file('file')->extension();
77 77
                     $request->file->storeAs('dna', $file_name);
78 78
                     define('STDIN', fopen('php://stdin', 'r'));
79 79
                     $random_string = unique_random('dnas', 'variable_name', 5);
80
-                    $var_name = 'var_'.$random_string;
81
-                    $filename = 'app/dna/'.$file_name;
80
+                    $var_name = 'var_' . $random_string;
81
+                    $filename = 'app/dna/' . $file_name;
82 82
                     $user_id = $currentUser->id;
83 83
                     $dna = new Dna();
84
-                    $dna->name = 'DNA Kit for user '.$user_id;
84
+                    $dna->name = 'DNA Kit for user ' . $user_id;
85 85
                     $dna->user_id = $user_id;
86 86
                     $dna->variable_name = $var_name;
87 87
                     $dna->file_name = $file_name;
Please login to merge, or discard this patch.