@@ -6,6 +6,6 @@ |
||
6 | 6 | { |
7 | 7 | public static function hashSuffix($seed) |
8 | 8 | { |
9 | - return '['.substr(hash('md5', $seed), 0, 5).']'; |
|
9 | + return '[' . substr(hash('md5', $seed), 0, 5) . ']'; |
|
10 | 10 | } |
11 | 11 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $message->candidate_id = $candidate->id; |
28 | 28 | $message->to = $candidate->email; |
29 | 29 | //$message->from = ''; |
30 | - $message->subject = ContentParser::parse($predefinedMessage->subject, $candidate).' '.UtilsService::hashSuffix($candidate->id); |
|
30 | + $message->subject = ContentParser::parse($predefinedMessage->subject, $candidate) . ' ' . UtilsService::hashSuffix($candidate->id); |
|
31 | 31 | $message->body = ContentParser::parse($predefinedMessage->body, $candidate); |
32 | 32 | $message->save(); |
33 | 33 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | $field->order = $order + 1; |
20 | 20 | $field->save(); |
21 | 21 | |
22 | - $field->name = 'custom_field_'.$field->id; |
|
22 | + $field->name = 'custom_field_' . $field->id; |
|
23 | 23 | $field->save(); |
24 | 24 | |
25 | 25 | return $field; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | public function toMail($notifiable) |
45 | 45 | { |
46 | - $url = url(config('app.b_url').'/password-reset/'.$this->token); |
|
46 | + $url = url(config('app.b_url') . '/password-reset/' . $this->token); |
|
47 | 47 | |
48 | 48 | return (new MailMessage()) |
49 | 49 | ->line('You are receiving this email because we received a password reset request for your account.') |
@@ -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')), |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | |
48 | 48 | if (count($array) === 2) { |
49 | 49 | $query = $query |
50 | - ->where('name', 'like', '%'.$array[0].'%'); |
|
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 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | if (!$user->can('read all recruitments')) { |
63 | 63 | $filtered = $candidates->filter( |
64 | - function ($candidate, $key) use ($user) { |
|
64 | + function($candidate, $key) use ($user) { |
|
65 | 65 | return $user->can('view', $candidate); |
66 | 66 | } |
67 | 67 | ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | $candidate = CandidateUpdater::updateCandidate($candidate->id, $request); |
97 | 97 | |
98 | - return response()->json($candidate, 200, ['Location' => '/candidates/'.$candidate->id]); |
|
98 | + return response()->json($candidate, 200, ['Location' => '/candidates/' . $candidate->id]); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | public function delete(CandidateDeleteRequest $request, Candidate $candidate) |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $candidate->save(); |
113 | 113 | } |
114 | 114 | |
115 | - return response()->json($candidate, 200, ['Location' => '/candidates/'.$candidate->id]); |
|
115 | + return response()->json($candidate, 200, ['Location' => '/candidates/' . $candidate->id]); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | //TODO: route nie chroniony - docelowo zrobić zabezpieczenie z użyciem jednorazowych tokenów, a także nie przekazywać do klienta pola path_to_cv |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | return response('File not found', 404); |
126 | 126 | } |
127 | 127 | |
128 | - $fileName = str_replace(' ', '_', $candidate->name).'-CV.pdf'; //TODO sanitize |
|
128 | + $fileName = str_replace(' ', '_', $candidate->name) . '-CV.pdf'; //TODO sanitize |
|
129 | 129 | |
130 | 130 | if ($download) { |
131 | 131 | return Storage::disk('s3')->download($candidate->path_to_cv, $fileName); |
@@ -138,6 +138,6 @@ discard block |
||
138 | 138 | { |
139 | 139 | $candidate = StageChanger::changeStage($request); |
140 | 140 | |
141 | - return response()->json($candidate, 200, ['Location' => '/candidates/'.$candidate->id]); |
|
141 | + return response()->json($candidate, 200, ['Location' => '/candidates/' . $candidate->id]); |
|
142 | 142 | } |
143 | 143 | } |
@@ -24,6 +24,6 @@ |
||
24 | 24 | |
25 | 25 | $note = Note::with('user')->find($note->id); |
26 | 26 | |
27 | - return response()->json($note, 201, ['Location'=>'/notes/'.$note->id]); |
|
27 | + return response()->json($note, 201, ['Location'=>'/notes/' . $note->id]); |
|
28 | 28 | } |
29 | 29 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function handle($request, Closure $next) |
21 | 21 | { |
22 | 22 | if ($request->has('access_token')) { |
23 | - $request->headers->set('Authorization', 'Bearer '.$request->get('access_token')); |
|
23 | + $request->headers->set('Authorization', 'Bearer ' . $request->get('access_token')); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | return $next($request); |
@@ -27,8 +27,8 @@ |
||
27 | 27 | public function toArray($request) |
28 | 28 | { |
29 | 29 | $array = parent::toArray($request); |
30 | - $array['url'] = config('app.apply_url').'/'.static::$tenantManager->getTenant()->subdomain.'/'.$array['key'] |
|
31 | - .'-'.preg_replace("/[^A-Za-z0-9\-]/", '', str_replace(' ', '-', $this->recruitment->job_title)); |
|
30 | + $array['url'] = config('app.apply_url') . '/' . static::$tenantManager->getTenant()->subdomain . '/' . $array['key'] |
|
31 | + .'-' . preg_replace("/[^A-Za-z0-9\-]/", '', str_replace(' ', '-', $this->recruitment->job_title)); |
|
32 | 32 | |
33 | 33 | return $array; |
34 | 34 | } |