Passed
Push — master ( 53f161...b6d7ca )
by
unknown
43s
created
public_html/tc/model/JobApplicationWithAnswers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 require_once '../model/JobPosterApplication.php';
4 4
 require_once '../model/ApplicationQuestionAnswer.php';
5 5
 
6
-class JobApplicationWithAnswers implements JsonSerializable{
6
+class JobApplicationWithAnswers implements JsonSerializable {
7 7
     
8 8
     private $job_poster_application;
9 9
     private $application_question_answers;
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      * @param JobPosterApplication $job_poster_application
14 14
      * @param ApplicationQuestionAnswer[] $application_question_answers
15 15
      */
16
-    public function __construct($job_poster_application = null,$application_question_answers = []) {
16
+    public function __construct($job_poster_application = null, $application_question_answers = []) {
17 17
         $this->job_poster_application = $job_poster_application;
18 18
         $this->application_question_answers = $application_question_answers;
19 19
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $getter_names = get_class_methods(get_class($this));
23 23
         $gettable_attributes = array();
24 24
         foreach ($getter_names as $key => $value) {
25
-            if(substr($value, 0, 3) === 'get') {
25
+            if (substr($value, 0, 3) === 'get') {
26 26
                 $gettable_attributes[strtolower(substr($value, 3, strlen($value)))] = $this->$value();
27 27
             }
28 28
         }
Please login to merge, or discard this patch.
public_html/tc/model/JobSeeker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * and open the template in the editor.
7 7
  */
8 8
 
9
-class JobSeeker{
9
+class JobSeeker {
10 10
     
11 11
     private $user;
12 12
     
Please login to merge, or discard this patch.
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/ProfilePicController.php 2 patches
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,11 @@
 block discarded – undo
19 19
 class ProfilePicController {
20 20
     
21 21
     public static function getProfilePic($user_id) {
22
-        if (ProfilePicDAO::profilePicExistsForUser($user_id))
23
-            return ProfilePicDAO::getProfilePic($user_id);
24
-        else 
25
-            return NULL;
22
+        if (ProfilePicDAO::profilePicExistsForUser($user_id)) {
23
+                    return ProfilePicDAO::getProfilePic($user_id);
24
+        } else {
25
+                    return NULL;
26
+        }
26 27
     }
27 28
     
28 29
     public static function putProfilePic($profile_pic) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 ini_set("display_errors", 1);
7 7
 set_time_limit(0);
8 8
 
9
-if(!isset($_SESSION)){
9
+if (!isset($_SESSION)) {
10 10
     session_start();
11 11
 }
12 12
 
Please login to merge, or discard this patch.
public_html/tc/controller/WorkEnvironmentController.php 2 patches
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.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,10 +123,11 @@
 block discarded – undo
123 123
     }
124 124
     
125 125
     public static function getWorkplacePhotoByManagerProfileAndName($photoName, $managerProfileId) {
126
-        if (WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName))
127
-            return WorkEnvironmentDAO::getWorkplacePhoto($managerProfileId, $photoName);
128
-        else 
129
-            return NULL;            
126
+        if (WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName)) {
127
+                    return WorkEnvironmentDAO::getWorkplacePhoto($managerProfileId, $photoName);
128
+        } else {
129
+                    return NULL;
130
+        }
130 131
     }
131 132
     
132 133
     /**
Please login to merge, or discard this patch.