Completed
Push — master ( 53f161...53f161 )
by Grant
03:58
created
public_html/tc/model/JobPosterNonLocalized.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -44,40 +44,40 @@  discard block
 block discarded – undo
44 44
     private $language_id;
45 45
 
46 46
     public function __construct(
47
-            $id=null,
48
-            $manager_user_id=null,
49
-            $title_en=null,
50
-            $title_fr=null,
51
-            $department_id=null,
52
-            $province_id=null,
53
-            $branch_en=null,
54
-            $branch_fr=null,
55
-            $division_en=null,
56
-            $division_fr=null,
57
-            $city_en=null,
58
-            $city_fr=null,
59
-            $term_qty=null,
60
-            $term_units_id=null,
61
-            $open_date=null,
62
-            $close_date=null,
63
-            $start_date=null,
64
-            $remuneration_range_low=null,
65
-            $remuneration_range_high=null,
66
-            $job_min_level_id=null,
67
-            $job_max_level_id=null,
68
-            $impact_en=null,
69
-            $impact_fr=null,
70
-            $key_tasks_en=null,
71
-            $key_tasks_fr=null,
72
-            $core_competencies_en=null,
73
-            $core_competencies_fr=null,
74
-            $developing_competencies_en=null,
75
-            $developing_competencies_fr=null,
76
-            $questions_en=[],
77
-            $questions_fr=[],
78
-            $classification=null,
79
-            $clearance_id=null,
80
-            $language_id=null
47
+            $id = null,
48
+            $manager_user_id = null,
49
+            $title_en = null,
50
+            $title_fr = null,
51
+            $department_id = null,
52
+            $province_id = null,
53
+            $branch_en = null,
54
+            $branch_fr = null,
55
+            $division_en = null,
56
+            $division_fr = null,
57
+            $city_en = null,
58
+            $city_fr = null,
59
+            $term_qty = null,
60
+            $term_units_id = null,
61
+            $open_date = null,
62
+            $close_date = null,
63
+            $start_date = null,
64
+            $remuneration_range_low = null,
65
+            $remuneration_range_high = null,
66
+            $job_min_level_id = null,
67
+            $job_max_level_id = null,
68
+            $impact_en = null,
69
+            $impact_fr = null,
70
+            $key_tasks_en = null,
71
+            $key_tasks_fr = null,
72
+            $core_competencies_en = null,
73
+            $core_competencies_fr = null,
74
+            $developing_competencies_en = null,
75
+            $developing_competencies_fr = null,
76
+            $questions_en = [],
77
+            $questions_fr = [],
78
+            $classification = null,
79
+            $clearance_id = null,
80
+            $language_id = null
81 81
         ) {
82 82
         $this->id = $id;
83 83
         $this->manager_user_id = $manager_user_id;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $getter_names = get_class_methods(get_class($this));
121 121
         $gettable_attributes = array();
122 122
         foreach ($getter_names as $key => $value) {
123
-            if(substr($value, 0, 3) === 'get') {
123
+            if (substr($value, 0, 3) === 'get') {
124 124
                 $gettable_attributes[strtolower(substr($value, 3, strlen($value)))] = $this->$value();
125 125
             }
126 126
         }
Please login to merge, or discard this patch.
public_html/tc/model/ManagerProfileDetailsNonLocalized.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * and open the template in the editor.
7 7
  */
8 8
 
9
-class ManagerProfileDetailsNonLocalized implements JsonSerializable{
9
+class ManagerProfileDetailsNonLocalized implements JsonSerializable {
10 10
 
11 11
     private $user_manager_profile_details_id;
12 12
     private $locale_id;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $getter_names = get_class_methods(get_class($this));
102 102
         $gettable_attributes = array();
103 103
         foreach ($getter_names as $key => $value) {
104
-            if(substr($value, 0, 3) === 'get') {
104
+            if (substr($value, 0, 3) === 'get') {
105 105
                 $gettable_attributes[strtolower(substr($value, 3, strlen($value)))] = $this->$value();
106 106
             }
107 107
         }
Please login to merge, or discard this patch.
public_html/tc/controller/LookupController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 ini_set("display_errors", 1);
6 6
 set_time_limit(0);
7 7
 
8
-if(!isset($_SESSION)){
8
+if (!isset($_SESSION)) {
9 9
     session_start();
10 10
 }
11 11
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param string $locale
26 26
      * @return Page object
27 27
      */
28
-    public static function getLookupDataByLocaleAndType($locale,$dataType) {
28
+    public static function getLookupDataByLocaleAndType($locale, $dataType) {
29 29
 
30 30
         switch ($dataType) {
31 31
             case 'province':
Please login to merge, or discard this patch.
public_html/tc/controller/AuthenticationController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 ini_set("display_errors", 1);
6 6
 set_time_limit(0);
7 7
 
8
-if(!isset($_SESSION)){
8
+if (!isset($_SESSION)) {
9 9
     session_start();
10 10
 }
11 11
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public static function getAuthToken($username, $password) {
33 33
         $authUser = AuthenticationController::authenticateUser($username, $password);
34 34
         //var_dump($authUser);
35
-        if($authUser && $authUser->getIs_confirmed()){
35
+        if ($authUser && $authUser->getIs_confirmed()) {
36 36
             $token = JWTUtils::generateJWT($authUser);
37 37
             //store authtoken 
38 38
             //AuthenticationDAO::storeAuthToken($result,$authUser);
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
      * @global type $dbResourcesArray
46 46
      * @return type
47 47
      */
48
-    public static function authenticateUser($username,$password) {
48
+    public static function authenticateUser($username, $password) {
49 49
         $authUser = UserDAO::getUserByCredentials($username, $password);
50
-        if($authUser){
50
+        if ($authUser) {
51 51
             $authUser->setPassword($password);
52 52
         }
53 53
         return $authUser;
Please login to merge, or discard this patch.
public_html/tc/controller/SkillDeclarationController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@
 block discarded – undo
9 9
 require_once '../model/SkillDeclaration.php';
10 10
 require_once '../dao/SkillDeclarationDAO.php';
11 11
 
12
-class SkillDeclarationController{
12
+class SkillDeclarationController {
13 13
     
14
-    public static function getAllSkillDeclarationsForJobApplication($jobPosterApplicationId){
14
+    public static function getAllSkillDeclarationsForJobApplication($jobPosterApplicationId) {
15 15
         
16 16
         $skillDeclarations = SkillDeclarationDAO::getSkillDeclarationsForJobApplication($jobPosterApplicationId);
17 17
                 
Please login to merge, or discard this patch.
public_html/tc/controller/WorkEnvironmentController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 require_once '../model/WorkplacePhotoCaption.php';
12 12
 require_once '../dao/WorkEnvironmentDAO.php';
13 13
 
14
-class WorkEnvironmentController{
14
+class WorkEnvironmentController {
15 15
     
16 16
     public static function setWorkEnvironmentByManagerProfile($workEnvironment, $managerProfileId) {
17 17
         $workEnvId = WorkEnvironmentDAO::getWorkEnvironmentIdByManagerProfile($managerProfileId);
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
         }
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
         $workEnvironment->getBasic_work_environment()->setId($workEnvironmentId);
38 38
         
39 39
         $workEnvId = $workEnvironment->getBasic_work_environment()->getId();
40
-        foreach($workEnvironment->getWorkplace_photo_captions() as $newCaption) {
40
+        foreach ($workEnvironment->getWorkplace_photo_captions() as $newCaption) {
41 41
             //See if caption for this workplace + photoName already exists            
42 42
             $oldCaption = WorkEnvironmentDAO::getWorkplacePhotoCaptionByName($workEnvId, $newCaption->getPhoto_name());
43 43
             if ($oldCaption) {
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);
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
         WorkEnvironmentDAO::updateBasicWorkEnvironment($workEnvironment->getBasic_work_environment());
65 65
         
66 66
         $workEnvId = $workEnvironment->getBasic_work_environment()->getId();
67
-        foreach($workEnvironment->getWorkplace_photo_captions() as $newCaption) {
67
+        foreach ($workEnvironment->getWorkplace_photo_captions() as $newCaption) {
68 68
             //See if caption for this workplace + photoName already exists            
69 69
             $oldCaption = WorkEnvironmentDAO::getWorkplacePhotoCaptionByName($workEnvId, $newCaption->getPhoto_name());
70 70
             if ($oldCaption) {
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/ManagerProfileController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 require_once '../controller/WorkEnvironmentController.php';
18 18
 require_once '../dao/ManagerProfileDAO.php';
19 19
 
20
-class ManagerProfileController{
20
+class ManagerProfileController {
21 21
 
22
-    public static function putManagerProfile(ManagerProfile $managerProfile, ManagerProfileDetailsNonLocalized $managerProfileDetails){
22
+    public static function putManagerProfile(ManagerProfile $managerProfile, ManagerProfileDetailsNonLocalized $managerProfileDetails) {
23 23
         //Check if previious manager profile exists
24 24
         $oldProfile = self::getManagerProfileByUser($managerProfile->getUser_id());
25 25
         if ($oldProfile) {
@@ -40,13 +40,13 @@  discard block
 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
         }
47 47
     }
48 48
 
49
-    public static function getManagerProfileByUser($userId){
49
+    public static function getManagerProfileByUser($userId) {
50 50
 
51 51
         $response = ManagerProfileDAO::getManagerProfileByUser($userId);
52 52
         
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         return $response;
62 62
     }
63 63
 
64
-    public static function getManagerProfileWithDetails(ManagerProfile $managerProfile){
64
+    public static function getManagerProfileWithDetails(ManagerProfile $managerProfile) {
65 65
 
66 66
         $user = new User();
67 67
         $user->setUser_id($managerProfile->getUser_id());
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         $localizedDetails = new LocalizedValues($details_en, $details_fr);
81 81
 
82
-        $managerProfileWithDetails = new ManagerProfileWithDetails($profile,$localizedDetails,$managerUser);
82
+        $managerProfileWithDetails = new ManagerProfileWithDetails($profile, $localizedDetails, $managerUser);
83 83
 
84 84
         $response = $managerProfileWithDetails;
85 85
 
Please login to merge, or discard this patch.
public_html/tc/controller/JobApplicationController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 require_once '../controller/MicroReferenceController.php';
17 17
 require_once '../controller/WorkSampleController.php';
18 18
 
19
-class JobApplicationController{
19
+class JobApplicationController {
20 20
         
21
-    public static function getApplicationQuestionAnswers($jobPosterApplicationId){
21
+    public static function getApplicationQuestionAnswers($jobPosterApplicationId) {
22 22
         
23 23
         $questionAnswers = JobApplicationDAO::getApplicationQuestionAnswersByApplicationId($jobPosterApplicationId);
24 24
         
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         
27 27
     }
28 28
     
29
-    public static function getJobPosterApplicationById($jobPosterApplicationId){
29
+    public static function getJobPosterApplicationById($jobPosterApplicationId) {
30 30
         
31 31
         $jobPosterApplication = JobApplicationDAO::getJobPosterApplicationByApplicationId($jobPosterApplicationId);
32 32
         
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public static function updateJobApplicationWithAnswers($jobApplicationWithAnswers) {
52 52
         $rowsModified = JobApplicationDAO::updateJobPosterApplication($jobApplicationWithAnswers->getJob_poster_application());
53 53
         $applicationId = $jobApplicationWithAnswers->getJob_poster_application()->getJob_poster_application_id();
54
-        foreach($jobApplicationWithAnswers->getApplication_question_answers() as $questionAnswer) {
54
+        foreach ($jobApplicationWithAnswers->getApplication_question_answers() as $questionAnswer) {
55 55
             $questionAnswer->setJob_poster_application_id($applicationId); //Just to ensure id is correct
56 56
             $rowsModified = $rowsModified + JobApplicationDAO::putApplicationQuestionAnswer($questionAnswer);
57 57
         }
@@ -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
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public static function getJobApplicationsWithAnswersForJobPosterApplications($jobPosterApplications) {
79 79
         $jobApplicationsWithAnswers = [];
80 80
         
81
-        foreach($jobPosterApplications as $jpa) {
81
+        foreach ($jobPosterApplications as $jpa) {
82 82
             $questionAnswers = self::getApplicationQuestionAnswers($jpa->getJob_poster_application_id());
83 83
             $jobApplication = new JobApplicationWithAnswers($jpa, $questionAnswers);
84 84
             array_push($jobApplicationsWithAnswers, $jobApplication);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         
113 113
         $jobPosterApplicationId = JobApplicationDAO::createJobPosterApplication($jobApplicationWithAnswers->getJob_poster_application());
114 114
         
115
-        foreach($jobApplicationWithAnswers->getApplication_question_answers() as $questionAnswer) {
115
+        foreach ($jobApplicationWithAnswers->getApplication_question_answers() as $questionAnswer) {
116 116
             $questionAnswer->setJob_poster_application_id($jobPosterApplicationId);
117 117
         }
118 118
         JobApplicationDAO::createApplicationQuestionAnswers($jobApplicationWithAnswers->getApplication_question_answers());
@@ -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.
public_html/tc/controller/ResourceController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 ini_set("display_errors", 1);
6 6
 set_time_limit(0);
7 7
 
8
-if(!isset($_SESSION)){
8
+if (!isset($_SESSION)) {
9 9
     session_start();
10 10
 }
11 11
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($resourceKey != null && !empty($resourceKey)) {
38 38
             if ($keyOption != null) {
39 39
                 return $commonLabelArray[$resourceKey][$keyOption];
40
-            } else {
40
+            }else {
41 41
                 return $commonLabelArray[$resourceKey];
42 42
             }
43 43
         }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if ($resourceKey != null && !empty($resourceKey)) {
58 58
             if ($keyOption != null) {
59 59
                 return $labelArray[$resourceKey][$keyOption];
60
-            } else {
60
+            }else {
61 61
                 return $labelArray[$resourceKey];
62 62
             }
63 63
         }
Please login to merge, or discard this patch.