@@ -28,8 +28,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -24,7 +24,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -78,12 +78,12 @@ |
||
| 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; |
@@ -34,7 +34,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -84,12 +84,12 @@ |
||
| 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; |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | //var_dump($requestParams); |
| 23 | 23 | switch ($requestMethod) { |
| 24 | 24 | case 'GET': |
| 25 | - if(strlen($requestParams) > 1){ |
|
| 26 | - $userId = Utils::getParameterFromRequest($requestParams,4); |
|
| 25 | + if (strlen($requestParams) > 1) { |
|
| 26 | + $userId = Utils::getParameterFromRequest($requestParams, 4); |
|
| 27 | 27 | $skillUrlEncoded = Utils::getParameterFromRequest($requestParams, 6); |
| 28 | 28 | |
| 29 | 29 | //This is viewable by the owner of the application, the owner of the job poster its for, and admins |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 46 | 46 | echo($json); |
| 47 | - } else { |
|
| 47 | + }else { |
|
| 48 | 48 | $result = array(); |
| 49 | 49 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 50 | 50 | echo($json); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
| 83 | 83 | $criteriaId = Utils::getParameterFromRequest($requestParams,6); |
| 84 | 84 | |
| 85 | - //This action is available to the owner of the application, the owner of the job poster its for, and admins |
|
| 85 | + //This action is available to the owner of the application, the owner of the job poster its for, and admins |
|
| 86 | 86 | $userId = JobApplicationController::getJobApplicationUserId($jobPosterApplicationId); |
| 87 | 87 | $userPermissions = []; |
| 88 | 88 | $userPermissions[] = new UserPermission(ROLE_ADMIN); |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | //var_dump($requestParams); |
| 25 | 25 | switch ($requestMethod) { |
| 26 | 26 | case 'GET': |
| 27 | - if(strlen($requestParams) > 1){ |
|
| 28 | - $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
|
| 27 | + if (strlen($requestParams) > 1) { |
|
| 28 | + $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams, 4); |
|
| 29 | 29 | |
| 30 | 30 | //This is viewable by the owner of the application, the owner of the job poster its for, and admins |
| 31 | 31 | $userId = JobApplicationController::getJobApplicationUserId($jobPosterApplicationId); |
@@ -38,18 +38,18 @@ discard block |
||
| 38 | 38 | $result = SkillDeclarationController::getAllSkillDeclarationsForJobApplication($jobPosterApplicationId); |
| 39 | 39 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 40 | 40 | echo($json); |
| 41 | - } else { |
|
| 41 | + }else { |
|
| 42 | 42 | header('HTTP/1.0 400 Bad Request'); |
| 43 | - echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
|
| 43 | + echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT); |
|
| 44 | 44 | exit; |
| 45 | 45 | } |
| 46 | 46 | break; |
| 47 | 47 | case 'POST': |
| 48 | 48 | break; |
| 49 | 49 | case 'DELETE': |
| 50 | - if(strlen($requestParams) > 1){ |
|
| 51 | - $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
|
| 52 | - $criteriaId = Utils::getParameterFromRequest($requestParams,6); |
|
| 50 | + if (strlen($requestParams) > 1) { |
|
| 51 | + $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams, 4); |
|
| 52 | + $criteriaId = Utils::getParameterFromRequest($requestParams, 6); |
|
| 53 | 53 | |
| 54 | 54 | //This action is available to the owner of the application, the owner of the job poster its for, and admins |
| 55 | 55 | $userId = JobApplicationController::getJobApplicationUserId($jobPosterApplicationId); |
@@ -64,23 +64,23 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 66 | 66 | echo($json); |
| 67 | - } else { |
|
| 67 | + }else { |
|
| 68 | 68 | header('HTTP/1.0 403 Forbidden'); |
| 69 | 69 | echo json_encode(array("failed"=>"Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | |
| 74 | - } else { |
|
| 74 | + }else { |
|
| 75 | 75 | header('HTTP/1.0 400 Bad Request'); |
| 76 | - echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
|
| 76 | + echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT); |
|
| 77 | 77 | exit; |
| 78 | 78 | } |
| 79 | 79 | break; |
| 80 | 80 | case 'PUT': |
| 81 | - if(strlen($requestParams) > 1){ |
|
| 82 | - $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
|
| 83 | - $criteriaId = Utils::getParameterFromRequest($requestParams,6); |
|
| 81 | + if (strlen($requestParams) > 1) { |
|
| 82 | + $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams, 4); |
|
| 83 | + $criteriaId = Utils::getParameterFromRequest($requestParams, 6); |
|
| 84 | 84 | |
| 85 | 85 | //This action is available to the owner of the application, the owner of the job poster its for, and admins |
| 86 | 86 | $userId = JobApplicationController::getJobApplicationUserId($jobPosterApplicationId); |
@@ -108,15 +108,15 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 110 | 110 | echo($json); |
| 111 | - } else { |
|
| 111 | + }else { |
|
| 112 | 112 | header('HTTP/1.0 403 Forbidden'); |
| 113 | 113 | echo json_encode(array("failed"=>"Only Draft applications can be modified."), JSON_FORCE_OBJECT); |
| 114 | 114 | exit; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - } else { |
|
| 117 | + }else { |
|
| 118 | 118 | header('HTTP/1.0 400 Bad Request'); |
| 119 | - echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
|
| 119 | + echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT); |
|
| 120 | 120 | exit; |
| 121 | 121 | } |
| 122 | 122 | break; |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | case 'GET': |
| 28 | 28 | //Here Handle PUT Request |
| 29 | 29 | //$jsonBody = file_get_contents('php://input'); |
| 30 | - if(strlen($requestParams) > 1){ |
|
| 31 | - $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams,4); |
|
| 30 | + if (strlen($requestParams) > 1) { |
|
| 31 | + $jobPosterApplicationId = Utils::getParameterFromRequest($requestParams, 4); |
|
| 32 | 32 | $jobApplicationWithAnswers = JobApplicationController::getJobApplicationWithAnswersById($jobPosterApplicationId); |
| 33 | 33 | |
| 34 | 34 | //Authenticate that the submitting user owns job seeker profile (or is admin) |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $json = json_encode($jobApplicationWithAnswers, 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); |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | if ($result == NULL) { |
| 31 | 31 | http_response_code(404); |
| 32 | 32 | echo('No profile image uploaded for this user.'); |
| 33 | - } else { |
|
| 33 | + }else { |
|
| 34 | 34 | header("Content-type: " . $result->getType()); |
| 35 | 35 | echo($result->getImage()); |
| 36 | 36 | } |
| 37 | - }else{ |
|
| 37 | + }else { |
|
| 38 | 38 | header('HTTP/1.0 400 Bad Request'); |
| 39 | - echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
|
| 39 | + echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT); |
|
| 40 | 40 | exit; |
| 41 | 41 | } |
| 42 | 42 | break; |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | //Here Handle DELETE Request |
| 48 | 48 | break; |
| 49 | 49 | case 'PUT': |
| 50 | - if(strlen($requestParams) > 1){ |
|
| 51 | - $user_id = Utils::getParameterFromRequest($requestParams,4); |
|
| 50 | + if (strlen($requestParams) > 1) { |
|
| 51 | + $user_id = Utils::getParameterFromRequest($requestParams, 4); |
|
| 52 | 52 | |
| 53 | 53 | //Admins, and the owning applicant have permission to update |
| 54 | 54 | $userPermissions = []; |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | $result = ProfilePicController::putProfilePic($profile_pic); |
| 65 | 65 | |
| 66 | 66 | echo($result); |
| 67 | - }else{ |
|
| 67 | + }else { |
|
| 68 | 68 | header('HTTP/1.0 400 Bad Request'); |
| 69 | - echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
|
| 69 | + echo json_encode(array("failed"=>'No request parameters provided'), JSON_FORCE_OBJECT); |
|
| 70 | 70 | exit; |
| 71 | 71 | } |
| 72 | 72 | break; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | header("Content-type: " . $result->getType()); |
| 35 | 35 | echo($result->getImage()); |
| 36 | 36 | } |
| 37 | - }else{ |
|
| 37 | + } else{ |
|
| 38 | 38 | header('HTTP/1.0 400 Bad Request'); |
| 39 | 39 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 40 | 40 | exit; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $result = ProfilePicController::putProfilePic($profile_pic); |
| 65 | 65 | |
| 66 | 66 | echo($result); |
| 67 | - }else{ |
|
| 67 | + } else{ |
|
| 68 | 68 | header('HTTP/1.0 400 Bad Request'); |
| 69 | 69 | echo json_encode(array("failed"=>'No request parameters provided'),JSON_FORCE_OBJECT); |
| 70 | 70 | exit; |
@@ -49,7 +49,7 @@ |
||
| 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; |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | switch ($requestMethod) { |
| 26 | 26 | case 'GET': |
| 27 | 27 | |
| 28 | - if(strlen($requestParams) > 1){ |
|
| 28 | + if (strlen($requestParams) > 1) { |
|
| 29 | 29 | |
| 30 | 30 | //Job Posters are publicly viewable, no authentication |
| 31 | 31 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 36 | 36 | header("Content-length:" . strlen($json)); |
| 37 | 37 | echo($json); |
| 38 | - } else { |
|
| 38 | + }else { |
|
| 39 | 39 | $result = array(); |
| 40 | 40 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 41 | 41 | echo($json); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $result = JobPosterController::createJobPoster($jobPoster); |
| 112 | 112 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 113 | 113 | echo($json); |
| 114 | - } else { |
|
| 114 | + }else { |
|
| 115 | 115 | $result = array(); |
| 116 | 116 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 117 | 117 | echo($json); |