Skip to content

Commit

Permalink
Upgrade required php version. Added default value checking for candid…
Browse files Browse the repository at this point in the history
…ate item
  • Loading branch information
mjankovskis authored and briedis committed Jul 17, 2018
1 parent 0d98435 commit 5ec3cfe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"php": ">=5.5.0",
"php": ">=7.0",
"ext-curl": "*",
"ext-json": "*"
},
Expand Down
52 changes: 26 additions & 26 deletions src/Structures/CandidateItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,32 +156,32 @@ public static function fromArray(array $rawCandidate)
$candidate->rawData = $rawCandidate;

$candidate->id = $rawCandidate['_id'];
$candidate->address = $rawCandidate['address'];
$candidate->assigned_to = $rawCandidate['assigned_to'];
$candidate->cover_letter = $rawCandidate['cover_letter'];
$candidate->creation_date = $rawCandidate['creation_date'];
$candidate->education = $rawCandidate['education'];
$candidate->email_address = $rawCandidate['email_address'];
$candidate->followed_by = $rawCandidate['followed_by'];
$candidate->headline = $rawCandidate['headline'];
$candidate->initial = $rawCandidate['initial'];
$candidate->name = $rawCandidate['name'];
$candidate->origin = $rawCandidate['origin'];
$candidate->overall_score = $rawCandidate['overall_score'];
$candidate->phone_number = $rawCandidate['phone_number'];
$candidate->profile_photo_url = $rawCandidate['profile_photo_url'];
$candidate->questionnaire = $rawCandidate['questionnaire'];
$candidate->recruited_by = $rawCandidate['recruited_by'];
$candidate->referred_by = $rawCandidate['referred_by'];
$candidate->sourced_by = $rawCandidate['sourced_by'];
$candidate->resume = $rawCandidate['resume'];
$candidate->social_profiles = $rawCandidate['social_profiles'];
$candidate->source = $rawCandidate['source'];
$candidate->stage = $rawCandidate['stage'];
$candidate->summary = $rawCandidate['summary'];
$candidate->tags = $rawCandidate['tags'];
$candidate->updated_date = $rawCandidate['updated_date'];
$candidate->work_history = $rawCandidate['work_history'];
$candidate->address = $rawCandidate['address'] ?? '';
$candidate->assigned_to = $rawCandidate['assigned_to'] ?? [];
$candidate->cover_letter = $rawCandidate['cover_letter'] ?? '';
$candidate->creation_date = $rawCandidate['creation_date'] ?? '';
$candidate->education = $rawCandidate['education'] ?? [];
$candidate->email_address = $rawCandidate['email_address'] ?? '';
$candidate->followed_by = $rawCandidate['followed_by'] ?? '';
$candidate->headline = $rawCandidate['headline'] ?? '';
$candidate->initial = $rawCandidate['initial'] ?? '';
$candidate->name = $rawCandidate['name'] ?? '';
$candidate->origin = $rawCandidate['origin'] ?? '';
$candidate->overall_score = $rawCandidate['overall_score'] ?? [];
$candidate->phone_number = $rawCandidate['phone_number'] ?? '';
$candidate->profile_photo_url = $rawCandidate['profile_photo_url'] ?? '';
$candidate->questionnaire = $rawCandidate['questionnaire'] ?? [];
$candidate->recruited_by = $rawCandidate['recruited_by'] ?? [];
$candidate->referred_by = $rawCandidate['referred_by'] ?? [];
$candidate->sourced_by = $rawCandidate['sourced_by'] ?? [];
$candidate->resume = $rawCandidate['resume'] ?? [];
$candidate->social_profiles = $rawCandidate['social_profiles'] ?? [];
$candidate->source = $rawCandidate['source'] ?? [];
$candidate->stage = $rawCandidate['stage'] ?? [];
$candidate->summary = $rawCandidate['summary'] ?? '';
$candidate->tags = $rawCandidate['tags'] ?? [];
$candidate->updated_date = $rawCandidate['updated_date'] ?? '';
$candidate->work_history = $rawCandidate['work_history'] ?? [];

return $candidate;
}
Expand Down

0 comments on commit 5ec3cfe

Please sign in to comment.