@@ -43,14 +43,14 @@ |
||
| 43 | 43 | do { |
| 44 | 44 | $key = strtoupper(substr(md5(uniqid()), 0, self::SOURCE_KEY_MAXLENGTH)); |
| 45 | 45 | $sources = Source::where('key', $key)->count(); |
| 46 | - } while($sources > 0); |
|
| 46 | + } while ($sources > 0); |
|
| 47 | 47 | |
| 48 | 48 | return $key; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | public function save(array $options = []) |
| 52 | 52 | { |
| 53 | - if(empty($this->key)){ |
|
| 53 | + if (empty($this->key)) { |
|
| 54 | 54 | $this->key = $this->getUniqueKey(); |
| 55 | 55 | } |
| 56 | 56 | parent::save(); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public static function getOtherApplications(Candidate $candidate) |
| 12 | 12 | { |
| 13 | 13 | return Candidate::where('id', '!=', $candidate->id) |
| 14 | - ->where(function ($query) use ($candidate) { |
|
| 14 | + ->where(function($query) use ($candidate) { |
|
| 15 | 15 | $query->where('email', '=', $candidate->email) |
| 16 | 16 | ->orWhere('email', '=', sha1($candidate->email)) |
| 17 | 17 | ->orWhere('phone_number', '=', $candidate->phone_number) |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | return Candidate::query() |
| 27 | 27 | ->get(['name']) |
| 28 | - ->map(function ($candidate) { |
|
| 28 | + ->map(function($candidate) { |
|
| 29 | 29 | return trim( |
| 30 | 30 | join(' ', [ |
| 31 | 31 | htmlspecialchars(data_get($candidate, 'name')), |
@@ -50,9 +50,9 @@ discard block |
||
| 50 | 50 | ->where('name', 'like', '%' . $array[0] . '%'); |
| 51 | 51 | } else { |
| 52 | 52 | $query = $query |
| 53 | - ->where(function (Builder $query) use ($array) { |
|
| 53 | + ->where(function(Builder $query) use ($array) { |
|
| 54 | 54 | $query |
| 55 | - ->where(function (Builder $query) use ($array) { |
|
| 55 | + ->where(function(Builder $query) use ($array) { |
|
| 56 | 56 | foreach ($array as $item) { |
| 57 | 57 | $query->orWhere('name', 'like', "%{$item}%"); |
| 58 | 58 | } |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $message->candidate_id = $candidate->id; |
| 79 | 79 | $message->to = $emailAddress; |
| 80 | 80 | //$message->from = ''; |
| 81 | - $message->subject = ContentParser::parse($predefinedMessage->subject, $candidate, null, Auth::user());// . ' ' . UtilsService::hashSuffix($candidate->id); |
|
| 81 | + $message->subject = ContentParser::parse($predefinedMessage->subject, $candidate, null, Auth::user()); // . ' ' . UtilsService::hashSuffix($candidate->id); |
|
| 82 | 82 | $message->body = ContentParser::parse($predefinedMessage->body, $candidate, null, Auth::user()); |
| 83 | 83 | $message->save(); |
| 84 | 84 | |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | return []; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - return array_map(function ($pageNumber) use ($directory, $prefix) { |
|
| 135 | + return array_map(function($pageNumber) use ($directory, $prefix) { |
|
| 136 | 136 | $this->setPage($pageNumber); |
| 137 | 137 | |
| 138 | 138 | $destination = "{$directory}/{$prefix}{$pageNumber}.{$this->outputFormat}"; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | $phoneNumber = preg_replace("/[^0-9]/", '', $phoneNumber); |
| 12 | 12 | $len = strlen($phoneNumber); |
| 13 | - return substr($phoneNumber, 0,$len-6 )." ".substr($phoneNumber, $len-6,3 )." ".substr($phoneNumber, $len-3); |
|
| 13 | + return substr($phoneNumber, 0, $len - 6) . " " . substr($phoneNumber, $len - 6, 3) . " " . substr($phoneNumber, $len - 3); |
|
| 14 | 14 | } |
| 15 | 15 | // |
| 16 | 16 | // public function created_at() |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'user_id' => [ |
| 29 | 29 | 'required', |
| 30 | 30 | 'exists:tenant.users,id', |
| 31 | - Rule::unique('tenant.recruitment_user')->where(function ($query) { |
|
| 31 | + Rule::unique('tenant.recruitment_user')->where(function($query) { |
|
| 32 | 32 | return $query->where('recruitment_id', $this->recruitment->id); |
| 33 | 33 | }), |
| 34 | 34 | ] |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | public function getParsed(Request $request) |
| 29 | 29 | { |
| 30 | 30 | $candidateId = $request->get('candidate_id'); |
| 31 | - $fromStageId = $request->get('from_stage_id');; |
|
| 32 | - $toStageId = $request->get('to_stage_id');; |
|
| 31 | + $fromStageId = $request->get('from_stage_id'); ; |
|
| 32 | + $toStageId = $request->get('to_stage_id'); ; |
|
| 33 | 33 | $candidate = Candidate::findOrFail($candidateId); |
| 34 | 34 | $appointmentDateString = $request->get('appointment_date'); |
| 35 | 35 | $appointmentDate = new \DateTime($appointmentDateString); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | throw new \Exception('inconsistency detected'); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - DB::transaction(function () use ($tenantUser, $user) { |
|
| 68 | + DB::transaction(function() use ($tenantUser, $user) { |
|
| 69 | 69 | |
| 70 | 70 | $user->grantedRecruitments()->detach(); |
| 71 | 71 | $tenantUser->delete(); |