Completed
Pull Request — master (#220)
by
unknown
03:53
created
public_html/tc/controller/AuthenticationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         
79 79
         //Ensure this token was meant for us
80 80
         // Allow validating of keys created up a few seconds in the future, to allow for response time if we're currently waiting on a refreshing token
81
-        $expectation = new ValidationData(time()+NETWORK_REQUEST_TIMEOUT); 
81
+        $expectation = new ValidationData(time() + NETWORK_REQUEST_TIMEOUT); 
82 82
         $expectation->setIssuer(OPENID_URI);
83 83
         $expectation->setAudience(CLIENT_ID);   
84 84
         $claimIsValid = $token->validate($expectation);
Please login to merge, or discard this patch.
public_html/tc/services/SubmitJobApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 $json = json_encode($result, JSON_PRETTY_PRINT);
56 56
                 echo($json);
57 57
                         
58
-            } else {
58
+            }else {
59 59
                 header('HTTP/1.0 401 Unauthorized');
60 60
                 echo json_encode(array("failed" => 'Invalid arguments provided'), JSON_FORCE_OBJECT);
61 61
                 exit;
Please login to merge, or discard this patch.
public_html/tc/services/JobSeekers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
         $userPermissions[] = new UserPermission(ROLE_ADMIN);
33 33
         AuthenticationController::validateUser($userPermissions);
34 34
         
35
-        if(strlen($requestParams) > 1){
35
+        if (strlen($requestParams) > 1) {
36 36
             $result = JobSeekerController::getJobSeekers();
37 37
             $json = json_encode($result, JSON_PRETTY_PRINT);
38 38
             echo($json);
39
-        } else {
39
+        }else {
40 40
             $result = array();
41 41
             $json = json_encode($result, JSON_PRETTY_PRINT);
42 42
             echo($json);
Please login to merge, or discard this patch.
public_html/tc/services/FullJobApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $json = json_encode($fullJobApplication, JSON_PRETTY_PRINT);
50 50
             echo($json);
51 51
 
52
-        } else {
52
+        }else {
53 53
             header('HTTP/1.0 400 Bad Request');
54 54
             echo json_encode(array("failed" => 'No request parameters provided'), JSON_FORCE_OBJECT);
55 55
             exit;
Please login to merge, or discard this patch.
public_html/tc/services/ManagerProfile.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $user_id_param_index = 4;
23 23
     switch ($requestMethod) {
24 24
         case 'GET':
25
-            if(strlen($requestParams) > 1){
25
+            if (strlen($requestParams) > 1) {
26 26
                 //Manager Profile is public, no authentication needed
27 27
                 
28 28
                 $user_id = Utils::getParameterFromRequest($requestParams, $user_id_param_index);
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
                 if ($result === false) {
33 33
                     header('HTTP/1.0 404 Not Found');
34 34
                     echo json_encode(array("failed" => "Manager Profile does not exist for specified user"), JSON_FORCE_OBJECT);
35
-                } else {
35
+                }else {
36 36
                     $json = json_encode($result, JSON_PRETTY_PRINT);
37 37
                     echo($json);
38 38
                 }
39
-            } else {
39
+            }else {
40 40
                 $result = array();
41 41
                 $json = json_encode($result, JSON_PRETTY_PRINT);
42 42
                 echo($json);
Please login to merge, or discard this patch.
public_html/tc/services/Dashboard.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
             $userId = Utils::getParameterFromRequest($requestParams, $user_id_param_index);
30 30
             $locale = Utils::getLocaleFromRequest($requestParams);
31 31
 
32
-            if(strlen($requestParams) > 1){
32
+            if (strlen($requestParams) > 1) {
33 33
 
34
-                if(strlen($userId) > 0){
34
+                if (strlen($userId) > 0) {
35 35
 
36 36
                     //This is viewable by admins and the specified user
37 37
                     $userPermissions = [];
@@ -44,15 +44,15 @@  discard block
 block discarded – undo
44 44
 
45 45
                     echo($json);
46 46
 
47
-                } else {
47
+                }else {
48 48
                     header('HTTP/1.0 400 Bad Request');
49
-                    echo json_encode(array("failed"=>"No user id provided"),JSON_FORCE_OBJECT);
49
+                    echo json_encode(array("failed"=>"No user id provided"), JSON_FORCE_OBJECT);
50 50
                     exit;
51 51
                 }
52 52
 
53
-            } else {
53
+            }else {
54 54
                 header('HTTP/1.0 400 Bad Request');
55
-                echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT);
55
+                echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT);
56 56
                 exit;
57 57
             }
58 58
             /*
Please login to merge, or discard this patch.
public_html/tc/services/JobSeekerProfile.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     
29 29
     switch ($requestMethod) {
30 30
         case 'GET':
31
-            if(strlen($requestParams) > 1){
32
-                $user_id = Utils::getParameterFromRequest($requestParams,4);
31
+            if (strlen($requestParams) > 1) {
32
+                $user_id = Utils::getParameterFromRequest($requestParams, 4);
33 33
                 
34 34
                 //Admins, and the owning applicant have permission to view
35 35
                 $userPermissions = [];
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
                 $result = JobSeekerController::getJobSeekerProfileByUserId(intval($user_id));
41 41
                 $json = json_encode($result, JSON_PRETTY_PRINT);
42 42
                 echo($json);
43
-            } else {
43
+            }else {
44 44
                 $result = array();
45 45
                 $json = json_encode($result, JSON_PRETTY_PRINT);
46 46
                 echo($json);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             if (strlen($requestParams) > 1) {
74 74
                 $jobSeekerJSON = json_decode($jsonBody, TRUE);
75 75
                 //var_dump($jobSeekerJSON);
76
-                $user_id = Utils::getParameterFromRequest($requestParams,4);
76
+                $user_id = Utils::getParameterFromRequest($requestParams, 4);
77 77
                 
78 78
                 //Admins, and the owning applicant have permission to modify
79 79
                 $userPermissions = [];
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
                 
101 101
                 //$json = json_encode($result, JSON_PRETTY_PRINT);
102 102
                 echo($result);
103
-            } else {
103
+            }else {
104 104
                 header('HTTP/1.0 400 Bad Request');
105
-                echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT);
105
+                echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT);
106 106
                 exit;
107 107
             }
108 108
             break;
Please login to merge, or discard this patch.
public_html/tc/services/TeamCultureNonLocalized.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     //var_dump($requestParams);
25 25
     switch ($requestMethod) {
26 26
         case 'GET':
27
-            if(strlen($requestParams) > 1){
27
+            if (strlen($requestParams) > 1) {
28 28
                 //Team Culture is public, no authentication
29 29
                 
30 30
                 $managerProfileId = Utils::getParameterFromRequest($requestParams, 4);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                 $result = TeamCultureController::getTeamCultureNonLocalizedByManagerProfileId($managerProfileId);
33 33
                 $json = json_encode($result, JSON_PRETTY_PRINT);
34 34
                 echo($json);
35
-            } else {
35
+            }else {
36 36
                 $result = array();
37 37
                 $json = json_encode($result, JSON_PRETTY_PRINT);
38 38
                 echo($json);
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
             //Here Handle DELETE Request
46 46
             break;
47 47
         case 'PUT':
48
-            if(strlen($requestParams) > 1){
48
+            if (strlen($requestParams) > 1) {
49 49
 
50
-                $managerProfileId = Utils::getParameterFromRequest($requestParams,4);
50
+                $managerProfileId = Utils::getParameterFromRequest($requestParams, 4);
51 51
 
52
-                if(strlen($managerProfileId) > 0){
52
+                if (strlen($managerProfileId) > 0) {
53 53
 
54 54
                     $user = UserController::getUserByManagerProfileId($managerProfileId);
55 55
 
@@ -78,14 +78,14 @@  discard block
 block discarded – undo
78 78
                     echo($resultJson);
79 79
 
80 80
 
81
-                }else{
81
+                }else {
82 82
                     header('HTTP/1.0 400 Bad Request');
83
-                    echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT);
83
+                    echo json_encode(array("failed"=>"No manager profile id provided"), JSON_FORCE_OBJECT);
84 84
                     exit;
85 85
                 }
86
-            }else{
86
+            }else {
87 87
                 header('HTTP/1.0 400 Bad Request');
88
-                echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT);
88
+                echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT);
89 89
                 exit;
90 90
             }
91 91
             
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@
 block discarded – undo
78 78
                     echo($resultJson);
79 79
 
80 80
 
81
-                }else{
81
+                } else{
82 82
                     header('HTTP/1.0 400 Bad Request');
83 83
                     echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT);
84 84
                     exit;
85 85
                 }
86
-            }else{
86
+            } else{
87 87
                 header('HTTP/1.0 400 Bad Request');
88 88
                 echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT);
89 89
                 exit;
Please login to merge, or discard this patch.
public_html/tc/services/WorkEnvironmentByManagerProfile.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                 $result = WorkEnvironmentController::getWorkEnivronmentByManagerProfile($managerProfileId);
35 35
                 $json = json_encode($result, JSON_PRETTY_PRINT);
36 36
                 echo($json);
37
-            } else {
37
+            }else {
38 38
                 $result = array();
39 39
                 $json = json_encode($result, JSON_PRETTY_PRINT);
40 40
                 echo($json);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             //Here Handle DELETE Request 
48 48
             break;
49 49
         case 'PUT':
50
-                if(strlen($requestParams) > 1){
50
+                if (strlen($requestParams) > 1) {
51 51
                     
52 52
                     $managerProfileId = Utils::getParameterFromRequest($requestParams, 4);
53 53
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                         $basicWorkEnvironment->setFlexible_allowed($json['flexible_allowed']);
71 71
 
72 72
                         $photo_captions = [];
73
-                        foreach($json['workplace_photo_captions'] as $captionJson) {
73
+                        foreach ($json['workplace_photo_captions'] as $captionJson) {
74 74
                             $caption = new WorkplacePhotoCaption();
75 75
                             //$caption->setWork_environment_id($captionJson['work_environment_id']);
76 76
                             $caption->setPhoto_name($captionJson['photo_name']);
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
                         $resultJson = json_encode($result, JSON_PRETTY_PRINT);
85 85
                         echo($resultJson);                
86 86
                             
87
-                    }else{
87
+                    }else {
88 88
                         header('HTTP/1.0 400 Bad Request');
89
-                        echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT);
89
+                        echo json_encode(array("failed"=>"No manager profile id provided"), JSON_FORCE_OBJECT);
90 90
                         exit;
91 91
                     }
92
-                }else{
92
+                }else {
93 93
                     header('HTTP/1.0 400 Bad Request');
94
-                    echo json_encode(array("failed"=>'"No manager profile id provided"'),JSON_FORCE_OBJECT);
94
+                    echo json_encode(array("failed"=>'"No manager profile id provided"'), JSON_FORCE_OBJECT);
95 95
                     exit;
96 96
                 }
97 97
             break;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@
 block discarded – undo
84 84
                         $resultJson = json_encode($result, JSON_PRETTY_PRINT);
85 85
                         echo($resultJson);                
86 86
                             
87
-                    }else{
87
+                    } else{
88 88
                         header('HTTP/1.0 400 Bad Request');
89 89
                         echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT);
90 90
                         exit;
91 91
                     }
92
-                }else{
92
+                } else{
93 93
                     header('HTTP/1.0 400 Bad Request');
94 94
                     echo json_encode(array("failed"=>'"No manager profile id provided"'),JSON_FORCE_OBJECT);
95 95
                     exit;
Please login to merge, or discard this patch.