Test Setup Failed
Branch master (2cef12)
by Curtis
15:04
created
app/Http/Controllers/SubmController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,38 +17,38 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $query = Subm::query()->with('addr');
19 19
 
20
-        if($request->has('searchTerm')) {
21
-            $columnsToSearch = ['group','name','addr_id','rin','rfn','lang','email','phon','fax','www'];
20
+        if ($request->has('searchTerm')) {
21
+            $columnsToSearch = ['group', 'name', 'addr_id', 'rin', 'rfn', 'lang', 'email', 'phon', 'fax', 'www'];
22 22
             $search_term = json_decode($request->searchTerm)->searchTerm;
23
-            if(!empty($search_term)) {
23
+            if (!empty($search_term)) {
24 24
                 $searchQuery = '%' . $search_term . '%';
25
-                foreach($columnsToSearch as $column) {
25
+                foreach ($columnsToSearch as $column) {
26 26
                     $query->orWhere($column, 'LIKE', $searchQuery);
27 27
                 }
28 28
             }
29 29
         }
30 30
 
31
-        if($request->has('columnFilters')) {
31
+        if ($request->has('columnFilters')) {
32 32
 
33 33
             $filters = get_object_vars(json_decode($request->columnFilters));
34 34
             $relationship_column = array('addr.adr2');
35
-            foreach($filters as $key => $value) {
35
+            foreach ($filters as $key => $value) {
36 36
                 
37
-                if(!in_array($key, $relationship_column))
37
+                if (!in_array($key, $relationship_column))
38 38
                 {
39
-                    if(!empty($value)) {
39
+                    if (!empty($value)) {
40 40
                         $query->orWhere($key, 'like', '%' . $value . '%');
41 41
                     }
42 42
                 }
43 43
             }
44 44
         }
45 45
 
46
-        if($request->has('sort.0')) {
46
+        if ($request->has('sort.0')) {
47 47
             $sort = json_decode($request->sort[0]);
48 48
             $query->orderBy($sort->field, $sort->type);
49 49
         }
50 50
 
51
-        if($request->has("perPage")) {
51
+        if ($request->has("perPage")) {
52 52
             $rows = $query->paginate($request->perPage);
53 53
         }
54 54
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public function destroy($id)
151 151
     {
152 152
         $subm = Subm::find($id);
153
-        if($subm) {
153
+        if ($subm) {
154 154
             $subm->delete();
155 155
             return "true";
156 156
         }
Please login to merge, or discard this patch.
app/Http/Controllers/PersonAnciController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = PersonAnci::query();
18 18
 
19
-        if($request->has('searchTerm')) {
20
-            $columnsToSearch = ['group','anci'];
19
+        if ($request->has('searchTerm')) {
20
+            $columnsToSearch = ['group', 'anci'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     public function destroy($id)
132 132
     {
133 133
         $personanci = PersonAnci::find($id);
134
-        if($personanci) {
134
+        if ($personanci) {
135 135
             $personanci->delete();
136 136
             return "true";
137 137
         }
Please login to merge, or discard this patch.
app/Http/Controllers/SourceDataEvenController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = SourceDataEven::query();
18 18
 
19
-        if($request->has('searchTerm')) {
19
+        if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['group', 'date', 'plac'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function destroy($id)
136 136
     {
137 137
         $sourcedataeven = SourceDataEven::find($id);
138
-        if($sourcedataeven) {
138
+        if ($sourcedataeven) {
139 139
             $sourcedataeven->delete();
140 140
             return "true";
141 141
         }
Please login to merge, or discard this patch.
app/Http/Controllers/VerificationController.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,42 +12,42 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public function verify(Request $request)
14 14
     {
15
-       $user = User::findOrFail($request->id);
15
+        $user = User::findOrFail($request->id);
16 16
 
17 17
             // do this check ,only if you allow verified user to login
18 18
         //    if(! hash_equals((string) $request->id,(string) $user->getKey())){
19 19
         //        throw new AuthorizationException;
20 20
         //    }
21 21
 
22
-       if(! hash_equals((string) $request->hash,sha1($user->getEmailForVerification())))
23
-       {
24
-           return response()->json([
25
-               "message" => "Unauthorized",
26
-               "success" => false
27
-           ]);
28
-       }
22
+        if(! hash_equals((string) $request->hash,sha1($user->getEmailForVerification())))
23
+        {
24
+            return response()->json([
25
+                "message" => "Unauthorized",
26
+                "success" => false
27
+            ]);
28
+        }
29 29
 
30
-       if($user->hasVerifiedEmail())
31
-       {
32
-           return response()->json([
33
-               "message" => "User Allready Verified!",
34
-               "success" => false
35
-           ]);
36
-       }
30
+        if($user->hasVerifiedEmail())
31
+        {
32
+            return response()->json([
33
+                "message" => "User Allready Verified!",
34
+                "success" => false
35
+            ]);
36
+        }
37 37
 
38
-       if($user->markEmailAsVerified())
39
-       {
38
+        if($user->markEmailAsVerified())
39
+        {
40 40
             event(new Verified($user));
41
-       }
41
+        }
42 42
 
43
-       return response()->json([
44
-           "message" => "Email verified successfully!",
45
-           "success" => true
46
-       ]);
43
+        return response()->json([
44
+            "message" => "Email verified successfully!",
45
+            "success" => true
46
+        ]);
47 47
     }
48 48
 
49
-     public function resendVerificatonEmail(Request $request)
50
-     {
49
+        public function resendVerificatonEmail(Request $request)
50
+        {
51 51
         $user = User::where('email',$request->email)->firstOrFail();
52 52
         if(!$user)
53 53
         {
@@ -61,5 +61,5 @@  discard block
 block discarded – undo
61 61
             "message" => "Check your email",
62 62
             "success" => true
63 63
         ]);
64
-     }
64
+        }
65 65
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         //        throw new AuthorizationException;
20 20
         //    }
21 21
 
22
-       if(! hash_equals((string) $request->hash,sha1($user->getEmailForVerification())))
22
+       if (!hash_equals((string) $request->hash, sha1($user->getEmailForVerification())))
23 23
        {
24 24
            return response()->json([
25 25
                "message" => "Unauthorized",
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
            ]);
28 28
        }
29 29
 
30
-       if($user->hasVerifiedEmail())
30
+       if ($user->hasVerifiedEmail())
31 31
        {
32 32
            return response()->json([
33 33
                "message" => "User Allready Verified!",
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
            ]);
36 36
        }
37 37
 
38
-       if($user->markEmailAsVerified())
38
+       if ($user->markEmailAsVerified())
39 39
        {
40 40
             event(new Verified($user));
41 41
        }
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
      public function resendVerificatonEmail(Request $request)
50 50
      {
51
-        $user = User::where('email',$request->email)->firstOrFail();
52
-        if(!$user)
51
+        $user = User::where('email', $request->email)->firstOrFail();
52
+        if (!$user)
53 53
         {
54 54
             return response()->json([
55 55
                 "message" => "Failed to send!",
Please login to merge, or discard this patch.
app/Http/Controllers/PublicationController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = Publication::query();
18 18
 
19
-        if($request->has('searchTerm')) {
19
+        if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['name', 'description', 'is_active'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function destroy($id)
136 136
     {
137 137
         $publication = Publication::find($id);
138
-        if($publication) {
138
+        if ($publication) {
139 139
             $publication->delete();
140 140
             return "true";
141 141
         }
Please login to merge, or discard this patch.
app/Http/Controllers/PersonNameRomnController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = PersonNameRomn::query();
18 18
 
19
-        if($request->has('searchTerm')) {
19
+        if ($request->has('searchTerm')) {
20 20
             $columnsToSearch = ['name', 'email', 'phone'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     public function destroy($id)
164 164
     {
165 165
         $personnameromn = PersonNameRomn::find($id);
166
-        if($personnameromn) {
166
+        if ($personnameromn) {
167 167
             $personnameromn->delete();
168 168
             return "true";
169 169
         }
Please login to merge, or discard this patch.
app/Http/Controllers/SourceRefEvenController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = SourceRefEven::query();
18 18
 
19
-        if($request->has('searchTerm')) {
20
-            $columnsToSearch = ['group','even','role'];
19
+        if ($request->has('searchTerm')) {
20
+            $columnsToSearch = ['group', 'even', 'role'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function destroy($id)
136 136
     {
137 137
         $sourcerefeven = SourceRefEven::find($id);
138
-        if($sourcerefeven) {
138
+        if ($sourcerefeven) {
139 139
             $sourcerefeven->delete();
140 140
             return "true";
141 141
         }
Please login to merge, or discard this patch.
app/Http/Controllers/SubnController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $query = Subn::query();
18 18
 
19
-        if($request->has('searchTerm')) {
20
-            $columnsToSearch = ['subm','famf','temp','ance','desc','rin'];
19
+        if ($request->has('searchTerm')) {
20
+            $columnsToSearch = ['subm', 'famf', 'temp', 'ance', 'desc', 'rin'];
21 21
             $search_term = json_decode($request->searchTerm)->searchTerm;
22
-            if(!empty($search_term)) {
22
+            if (!empty($search_term)) {
23 23
                 $searchQuery = '%' . $search_term . '%';
24
-                foreach($columnsToSearch as $column) {
24
+                foreach ($columnsToSearch as $column) {
25 25
                     $query->orWhere($column, 'LIKE', $searchQuery);
26 26
                 }
27 27
             }
28 28
         }
29 29
 
30
-        if($request->has('columnFilters')) {
30
+        if ($request->has('columnFilters')) {
31 31
 
32 32
             $filters = get_object_vars(json_decode($request->columnFilters));
33 33
 
34
-            foreach($filters as $key => $value) {
35
-                if(!empty($value)) {
34
+            foreach ($filters as $key => $value) {
35
+                if (!empty($value)) {
36 36
                     $query->orWhere($key, 'like', '%' . $value . '%');
37 37
                 }
38 38
             }
39 39
         }
40 40
 
41
-        if($request->has('sort.0')) {
41
+        if ($request->has('sort.0')) {
42 42
             $sort = json_decode($request->sort[0]);
43 43
             $query->orderBy($sort->field, $sort->type);
44 44
         }
45 45
 
46
-        if($request->has("perPage")) {
46
+        if ($request->has("perPage")) {
47 47
             $rows = $query->paginate($request->perPage);
48 48
         }
49 49
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function destroy($id)
141 141
     {
142 142
         $subn = Subn::find($id);
143
-        if($subn) {
143
+        if ($subn) {
144 144
             $subn->delete();
145 145
             return "true";
146 146
         }
Please login to merge, or discard this patch.
app/Http/Controllers/GedcomController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,18 +25,18 @@
 block discarded – undo
25 25
             if ($request->file('file')->isValid()) {
26 26
 
27 27
                 try {
28
-                    $conn= 'tenant';
28
+                    $conn = 'tenant';
29 29
                     $currentTenant = app('currentTenant'); 
30 30
                     $db = $currentTenant->database;
31 31
                     $currentUser = auth()->user();
32
-                    $_name = uniqid().'.ged';
32
+                    $_name = uniqid() . '.ged';
33 33
                     $request->file->storeAs('gedcom', $_name);
34 34
                     define('STDIN', fopen('php://stdin', 'r'));
35 35
                     // $parser = new GedcomParser();
36 36
                     // $parser->parse($request->file('file'), $slug, true);
37
-                    $filename = 'app/gedcom/'.$_name;
37
+                    $filename = 'app/gedcom/' . $_name;
38 38
                     ImportGedcom::dispatch($filename, $slug, $currentUser->id, $conn, $db);
39
-                    return ['File uploaded: conn:-'.$conn.'-'];
39
+                    return ['File uploaded: conn:-' . $conn . '-'];
40 40
                 } catch (\Exception $e) {
41 41
                     return ['Not uploaded'];
42 42
                 }
Please login to merge, or discard this patch.