@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | $tenant = Tenant::find($tenantId); |
54 | 54 | |
55 | 55 | if (!$tenant) { |
56 | - throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.'); |
|
56 | + throw new RuntimeException('Tenant with ID = ' . $tenantId . ' does not exist.'); |
|
57 | 57 | } |
58 | 58 | |
59 | - $this->comment('Creating new user for tenant with subdomain \''.$tenant->subdomain.'\'.'); |
|
59 | + $this->comment('Creating new user for tenant with subdomain \'' . $tenant->subdomain . '\'.'); |
|
60 | 60 | |
61 | 61 | $email = $this->option('email'); |
62 | 62 | if (!$email) { |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $num = TenantUser::where('username', $email)->count(); |
67 | 67 | if ($num) { |
68 | - throw new RuntimeException('User with email \''.$email.'\' already exists.'); |
|
68 | + throw new RuntimeException('User with email \'' . $email . '\' already exists.'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $name = $this->option('name'); |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | |
91 | 91 | $user->assignRole('super-admin'); |
92 | 92 | |
93 | - DB::transaction(function () use ($tenantUser, $user) { |
|
93 | + DB::transaction(function() use ($tenantUser, $user) { |
|
94 | 94 | $tenantUser->save(); |
95 | 95 | $user->save(); |
96 | 96 | }); |
97 | 97 | |
98 | - $this->comment('Created user with username \''.$user->email.'\'.'); |
|
98 | + $this->comment('Created user with username \'' . $user->email . '\'.'); |
|
99 | 99 | } |
100 | 100 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $tenant = Tenant::find($tenantId); |
51 | 51 | |
52 | 52 | if (!$tenant) { |
53 | - throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.'); |
|
53 | + throw new RuntimeException('Tenant with ID = ' . $tenantId . ' does not exist.'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $this->tenantManager->setTenant($tenant); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $candidates = Candidate::whereNull('photo_extraction')->where('path_to_cv', '<>', '')->get(); |
60 | 60 | |
61 | 61 | foreach ($candidates as $candidate) { |
62 | - $this->info('Parsing candidate id '.$candidate->id); |
|
62 | + $this->info('Parsing candidate id ' . $candidate->id); |
|
63 | 63 | ProcessResume::dispatchNow($candidate); |
64 | 64 | gc_collect_cycles(); |
65 | 65 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $tenant = Tenant::find($tenantId); |
49 | 49 | |
50 | 50 | if (!$tenant) { |
51 | - throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.'); |
|
51 | + throw new RuntimeException('Tenant with ID = ' . $tenantId . ' does not exist.'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $this->tenantManager->setTenant($tenant); |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | $seeder = new \RolesAndPermissionsSeeder('tenant'); |
58 | 58 | $seeder->run(null); |
59 | 59 | |
60 | - $this->info('Data have been seeded for tenant with subdomain \''.$tenant->subdomain.'\'.'); |
|
60 | + $this->info('Data have been seeded for tenant with subdomain \'' . $tenant->subdomain . '\'.'); |
|
61 | 61 | } |
62 | 62 | } |
@@ -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 | } |