@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | require_once '../controller/JobSeekerController.php'; |
| 25 | 25 | require_once '../dao/UserDAO.php'; |
| 26 | 26 | |
| 27 | -class UserController{ |
|
| 27 | +class UserController { |
|
| 28 | 28 | |
| 29 | 29 | //TO-DO : remove - should not be used |
| 30 | 30 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param User $user |
| 44 | 44 | * @return type |
| 45 | 45 | */ |
| 46 | - public static function getUserById(User $user){ |
|
| 46 | + public static function getUserById(User $user) { |
|
| 47 | 47 | $existingUser = UserDAO::getUserById($user); |
| 48 | 48 | return $existingUser; |
| 49 | 49 | } |
@@ -53,15 +53,15 @@ discard block |
||
| 53 | 53 | * @param User $user |
| 54 | 54 | * @return type |
| 55 | 55 | */ |
| 56 | - public static function getUserByOpenId(User $user){ |
|
| 56 | + public static function getUserByOpenId(User $user) { |
|
| 57 | 57 | //get existing user by openId |
| 58 | 58 | $existingUser = UserDAO::getUserOpenById($user); |
| 59 | 59 | //var_dump($existingUser); |
| 60 | 60 | //get user_id from existing user |
| 61 | 61 | //if user_id is not null, then log the user in automatically |
| 62 | - if($existingUser){ |
|
| 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); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - public static function registerUser(User $newUser){ |
|
| 72 | + public static function registerUser(User $newUser) { |
|
| 73 | 73 | //$newUser->setUser_role('jobseeker'); |
| 74 | 74 | //This is a temporary automatic confirmation until the mail server is setup |
| 75 | 75 | //var_dump($newUser); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $userRegistered = false; |
| 78 | 78 | $confEmailSent = true; |
| 79 | 79 | $registeredUser = UserDAO::registerUser($newUser); |
| 80 | - if($registeredUser instanceof User && $registeredUser->getUser_id() !== null){ |
|
| 80 | + if ($registeredUser instanceof User && $registeredUser->getUser_id() !== null) { |
|
| 81 | 81 | $userRegistered = true; |
| 82 | 82 | //$confEmailSent = UserController::confirmEmail($registeredUser); |
| 83 | 83 | |
@@ -87,7 +87,7 @@ discard block |
||
| 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 |
||
| 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 |
@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $country_code = $pieces[1]; |
| 70 | 70 | $language_abbreviation = $pieces[0]; |
| 71 | 71 | |
| 72 | - $locale = LocaleDAO::getLocaleByIsoCode($country_code,$language_abbreviation); |
|
| 72 | + $locale = LocaleDAO::getLocaleByIsoCode($country_code, $language_abbreviation); |
|
| 73 | 73 | //var_dump($locale); |
| 74 | 74 | return $locale; |
| 75 | 75 | } |
@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | * @param string $locale |
| 42 | 42 | * @return JobPoster $jobPoster |
| 43 | 43 | */ |
| 44 | - public static function getJobPosterById($locale,$jobPosterId) {
|
|
| 44 | + public static function getJobPosterById($locale, $jobPosterId) {
|
|
| 45 | 45 | |
| 46 | - $jobPoster = JobPosterDAO::getJobPosterById($locale,$jobPosterId); |
|
| 46 | + $jobPoster = JobPosterDAO::getJobPosterById($locale, $jobPosterId); |
|
| 47 | 47 | return $jobPoster; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | * @param string $locale |
| 66 | 66 | * @return JobPoster[] $jobPosters |
| 67 | 67 | */ |
| 68 | - public static function getJobPostersByManagerId($locale,$managerId) {
|
|
| 68 | + public static function getJobPostersByManagerId($locale, $managerId) {
|
|
| 69 | 69 | |
| 70 | 70 | $jobPosters = new JobPosters(); |
| 71 | - $jobs = JobPosterDAO::getJobPostersByManagerId($locale,$managerId); |
|
| 71 | + $jobs = JobPosterDAO::getJobPostersByManagerId($locale, $managerId); |
|
| 72 | 72 | $jobPosters->setJobs($jobs); |
| 73 | 73 | return $jobPosters; |
| 74 | 74 | } |
@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | * @param string $locale |
| 57 | 57 | * @return Page object |
| 58 | 58 | */ |
| 59 | - public static function addJobSeekerProfile($jobSeekerProfile,$user_id) {
|
|
| 60 | - $newJobSeekerProfile = JobSeekerDAO::addJobSeekerProfile($jobSeekerProfile,$user_id); |
|
| 59 | + public static function addJobSeekerProfile($jobSeekerProfile, $user_id) {
|
|
| 60 | + $newJobSeekerProfile = JobSeekerDAO::addJobSeekerProfile($jobSeekerProfile, $user_id); |
|
| 61 | 61 | return $newJobSeekerProfile; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - public static function getJobSeekers(){
|
|
| 64 | + public static function getJobSeekers() {
|
|
| 65 | 65 | $jobSeekerProfiles = JobSeekerDAO::getJobSeekers(); |
| 66 | - foreach($jobSeekerProfiles as $profile) {
|
|
| 66 | + foreach ($jobSeekerProfiles as $profile) {
|
|
| 67 | 67 | $answers = JobSeekerDAO::getJobSeekerProfileAnswers($profile->getJob_seeker_profile_id()); |
| 68 | 68 | $profile->setJob_seeker_profile_answers($answers); |
| 69 | 69 | } |
@@ -4,9 +4,9 @@ |
||
| 4 | 4 | require_once '../model/ApplicationWorkSample.php'; |
| 5 | 5 | require_once '../dao/WorkSampleDAO.php'; |
| 6 | 6 | |
| 7 | -class WorkSampleController{ |
|
| 7 | +class WorkSampleController { |
|
| 8 | 8 | |
| 9 | - public static function getAllWorkSamplesForJobApplication($jobPosterApplicationId, $locale){ |
|
| 9 | + public static function getAllWorkSamplesForJobApplication($jobPosterApplicationId, $locale) { |
|
| 10 | 10 | |
| 11 | 11 | $applicationWorkSamples = WorkSampleDAO::getWorkSamplesForJobApplication($jobPosterApplicationId, $locale); |
| 12 | 12 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | $previousEntry = TeamCultureDAO::getTeamCultureNonLocalizedForManagerProfile($managerProfileId); |
| 17 | 17 | if ($previousEntry) { |
| 18 | 18 | $result = TeamCultureDAO::updateTeamCultureForManagerProfile($teamCulture, $managerProfileId); |
| 19 | - } else { |
|
| 19 | + }else { |
|
| 20 | 20 | $result = TeamCultureDAO::createTeamCultureForManagerProfile($teamCulture, $managerProfileId); |
| 21 | 21 | } |
| 22 | 22 | return $result; |
@@ -4,9 +4,9 @@ |
||
| 4 | 4 | require_once '../model/ApplicationMicroReference.php'; |
| 5 | 5 | require_once '../dao/MicroReferenceDAO.php'; |
| 6 | 6 | |
| 7 | -class MicroReferenceController{ |
|
| 7 | +class MicroReferenceController { |
|
| 8 | 8 | |
| 9 | - public static function getAllMicroReferencesForJobApplication($jobPosterApplicationId, $locale){ |
|
| 9 | + public static function getAllMicroReferencesForJobApplication($jobPosterApplicationId, $locale) { |
|
| 10 | 10 | |
| 11 | 11 | $applicationMicroReference = MicroReferenceDAO::getApplicationMicroReferencesForJobApplication($jobPosterApplicationId, $locale); |
| 12 | 12 | |
@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public static function getContentByLocale($locale) {
|
| 30 | 30 | |
| 31 | 31 | $content = new Content(); |
| 32 | - $labels = ContentDAO::getContentByLocale($locale,"label"); |
|
| 32 | + $labels = ContentDAO::getContentByLocale($locale, "label"); |
|
| 33 | 33 | //var_dump($labels); |
| 34 | 34 | $content->setContent($labels); |
| 35 | 35 | //var_dump($content); |
@@ -6,7 +6,7 @@ |
||
| 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 | |