Completed
Push — master ( d6f879...45c473 )
by Grant
15:35 queued 01:47
created
public_html/inc/applicant/page-view-job-poster.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
                         $loginLink .= "?response_type=" . URL_RESPONSE_TYPES;
241 241
                         if (strpos($url, 'admin') !== false) {
242 242
                             $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI_ADMIN);
243
-                        }else {
243
+                        } else {
244 244
                             $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI);
245 245
                         }
246 246
                         $loginLink .= "&nonce=" . $nonce;
Please login to merge, or discard this patch.
public_html/inc/common/landing-hero.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
                 $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
23 23
                 if (strpos($url, 'admin') !== false) {
24 24
                     echo '<p id="adminTagline" class="centered">Changing government through it\'s people</p>';
25
-                }else {
25
+                } else {
26 26
 
27 27
                 }
28 28
             ?>
Please login to merge, or discard this patch.
public_html/index.php 1 patch
Braces   +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
         header("Refresh:0; url=\"" . REDIRECT_URI . "");
64 64
     }
65
-}else {
65
+} else {
66 66
     $_SESSION['openid_connect_state'] = $state;
67 67
     $_SESSION['openid_connect_nonce'] = $nonce;
68 68
 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 echo("UserAPI.storeSessionUser(" . json_encode($userInfo) . ");");
109 109
                 echo("UserAPI.login();");
110 110
             }
111
-        }else {
111
+        } else {
112 112
             echo("UserAPI.login();");
113 113
         }
114 114
         //var isExistingUser = UserAPI.authenticate(UserAPI.getSessionUserAsJSON());
Please login to merge, or discard this patch.
public_html/tc/dao/JobPosterDAO.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -503,14 +503,18 @@
 block discarded – undo
503 503
             $sqlEssentialType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
504 504
             $sqlAssetType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
505 505
             
506
-            if (sizeof($key_task_data) > 0)
507
-                    $sql4->execute($key_task_data) or die("ERROR: " . implode(":", $link->errorInfo()));
508
-            if (sizeof($core_competency_data) > 0)
509
-                $sql5->execute($core_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
510
-            if (sizeof($dev_competency_data) > 0)
511
-                $sql6->execute($dev_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
512
-            if (sizeof($question_data) > 0)
513
-                $sqlQuestions->execute($question_data) or die("ERROR: " . implode(":", $link->errorInfo()));
506
+            if (sizeof($key_task_data) > 0) {
507
+                                $sql4->execute($key_task_data) or die("ERROR: " . implode(":", $link->errorInfo()));
508
+            }
509
+            if (sizeof($core_competency_data) > 0) {
510
+                            $sql5->execute($core_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
511
+            }
512
+            if (sizeof($dev_competency_data) > 0) {
513
+                            $sql6->execute($dev_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
514
+            }
515
+            if (sizeof($question_data) > 0) {
516
+                            $sqlQuestions->execute($question_data) or die("ERROR: " . implode(":", $link->errorInfo()));
517
+            }
514 518
 
515 519
             $link->commit();
516 520
         } catch (PDOException $e) {
Please login to merge, or discard this patch.
public_html/tc/index.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         header('HTTP/1.0 401 Unauthorized');
9 9
         echo 'Text to send if user hits Cancel button';
10 10
         exit;
11
-    }else {
11
+    } else {
12 12
         if ($_SERVER['PHP_AUTH_USER'] == 'test' && $_SERVER['PHP_AUTH_PW'] == 'test') {
13 13
             header("Access-Control-Allow-Origin: *");
14 14
             header("Content-Type: application/json");
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
                         $result = array('user' => 'test', 'pass' => 'test');
26 26
                         $json = json_encode($result);
27 27
                         echo($json);
28
-                    }else {
28
+                    } else {
29 29
                         $result1 = array('user' => 'test', 'pass' => 'test');
30 30
                         $result2 = array('user' => 'test1', 'pass' => 'test1');
31 31
                         $result3 = array('user' => 'test2', 'pass' => 'test2');
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                     echo("");
56 56
                     break;
57 57
             }
58
-        }else {
58
+        } else {
59 59
             header('WWW-Authenticate: Basic realm="My Realm"');
60 60
             header('HTTP/1.0 401 Unauthorized');
61 61
             echo 'Authorization declined';
Please login to merge, or discard this patch.
public_html/tc/controller/ManagerProfileController.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             }
41 41
             
42 42
             return ["manager_profile_id"=>$profileId];
43
-        }else {
43
+        } else {
44 44
             $profileId = ManagerProfileDAO::createManagerProfile($managerProfile, $managerProfileDetails);
45 45
             return ["manager_profile_id"=>$profileId];
46 46
         }
Please login to merge, or discard this patch.
public_html/tc/controller/WorkEnvironmentController.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         if ($workEnvId === 0) {
19 19
             $workEnvironment = self::createWorkEnvironment($workEnvironment);
20 20
             WorkEnvironmentDAO::setManagerProfileWorkEnvironment($managerProfileId, $workEnvironment->getBasic_work_environment()->getId());
21
-        }else {
21
+        } else {
22 22
             $workEnvironment->getBasic_work_environment()->setId($workEnvId);
23 23
             self::updateWorkEnvironment($workEnvironment);
24 24
         }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 //already exists, so just update description
45 45
                 $oldCaption->setDescription($newCaption->getDescription());
46 46
                 WorkEnvironmentDAO::updateWorkplacePhotoCaption($oldCaption);
47
-            }else { 
47
+            } else { 
48 48
                 //doesn't exist, so make sure it has correct work env id and blank photo id, and insert it
49 49
                 $newCaption->setWork_environment_id($workEnvId);
50 50
                 $newCaption->setWorkplace_photo_id(null);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 //already exists, so just update description
72 72
                 $oldCaption->setDescription($newCaption->getDescription());
73 73
                 WorkEnvironmentDAO::updateWorkplacePhotoCaption($oldCaption);
74
-            }else { 
74
+            } else { 
75 75
                 //doesn't exist, so make sure it has correct work env id and blank photo id, and insert it
76 76
                 $newCaption->setWork_environment_id($workEnvId);
77 77
                 $newCaption->setWorkplace_photo_id(null);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $exists = WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName);
98 98
         if ($exists) {
99 99
             WorkEnvironmentDAO::updateWorkplacePhoto($workplacePhoto, $managerProfileId, $photoName);      
100
-        }else {
100
+        } else {
101 101
             
102 102
             $photoId = WorkEnvironmentDAO::insertWorkplacePhoto($workplacePhoto);
103 103
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             if ($caption) {
114 114
                 $caption->setWorkplace_photo_id($photoId);
115 115
                 WorkEnvironmentDAO::updateWorkplacePhotoCaption($caption);
116
-            }else {                
116
+            } else {                
117 117
                 $caption = new WorkplacePhotoCaption($workEnvironmentId, $photoName, $photoId, '');      
118 118
                 WorkEnvironmentDAO::insertWorkplacePhotoCaption($caption);
119 119
             }
Please login to merge, or discard this patch.
public_html/tc/controller/UserController.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         //if user_id is not null, then log the user in automatically
62 62
         if ($existingUser) {
63 63
             return $existingUser;
64
-        }else {
64
+        } else {
65 65
             //if user_id is null, then the user is not registered and we should register them automatically
66 66
             //register new user
67 67
             $newUser = UserController::registerUser($user);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 $userId = $registeredUser->getUser_id();
88 88
                 $jobSeekerProfile = new JobSeekerProfile();                
89 89
                 $result = JobSeekerController::addJobSeekerProfile($jobSeekerProfile, $userId);
90
-            }else if ($registeredUser->getUser_role() === 'administrator') {
90
+            } else if ($registeredUser->getUser_role() === 'administrator') {
91 91
                 
92 92
                 $userId = $registeredUser->getUser_id();
93 93
                 $managerProfile = new ManagerProfile();
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             if ($oldUser->getEmail() != $updatedUser->getEmail()) {
130 130
                 $confEmailSent = UserController::confirmEmail($updatedUser);
131 131
                 $updatedUser->setIs_confirmed(false);
132
-            }else {
132
+            } else {
133 133
                 $updatedUser->setIs_confirmed($oldUser->getIs_confirmed());
134 134
             }
135 135
             $updateSuccessful = UserDAO::updateUser($updatedUser); //do updates
Please login to merge, or discard this patch.
public_html/tc/controller/JobApplicationController.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             $questionAnswers = self::getApplicationQuestionAnswers($jobPosterApplication->getJob_poster_application_id());
71 71
             $jobApplicationWithAnswers = new JobApplicationWithAnswers($jobPosterApplication, $questionAnswers);
72 72
             return $jobApplicationWithAnswers;
73
-        }else {
73
+        } else {
74 74
             return false;
75 75
         }
76 76
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             $workSamples = WorkSampleController::getAllWorkSamplesForJobApplication($jobPosterApplicationId, $locale);
166 166
             
167 167
             return new FullJobApplication($jobPosterApplication, $jobSeekerProfile, $questionAnswers, $skillDeclarations, $microReferences, $workSamples);
168
-        }else {
168
+        } else {
169 169
             return false;
170 170
         }
171 171
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $isDraft = self::jobApplicationIsDraft($jobPosterApplicationId);
175 175
         if ($isDraft) {
176 176
             return JobApplicationDAO::setJobAppliationStatus($jobPosterApplicationId, "Submitted");
177
-        }else {
177
+        } else {
178 178
             return ["false"=>"Cannot submit an application which is not a draft"];
179 179
         }
180 180
     }
Please login to merge, or discard this patch.