@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | if (!$user->can('read all recruitments')) { |
61 | - $filtered = $candidates->filter(function ($candidate, $key) use ($user) { |
|
61 | + $filtered = $candidates->filter(function($candidate, $key) use ($user) { |
|
62 | 62 | return $user->can('view', $candidate); |
63 | 63 | } |
64 | 64 | ); |
@@ -22,6 +22,6 @@ |
||
22 | 22 | $note->save(); |
23 | 23 | |
24 | 24 | $note = Note::with('user')->find($note->id); |
25 | - return response()->json($note, 201, ['Location'=>'/notes/'.$note->id]); |
|
25 | + return response()->json($note, 201, ['Location'=>'/notes/' . $note->id]); |
|
26 | 26 | } |
27 | 27 | } |
@@ -32,8 +32,9 @@ discard block |
||
32 | 32 | { |
33 | 33 | $source = Source::where('key', $sourceKey)->with('recruitment.formFields')->get()->first(); |
34 | 34 | |
35 | - if (empty($source)) |
|
36 | - return response()->json(['message' => 'Recruitment not found'], 404); |
|
35 | + if (empty($source)) { |
|
36 | + return response()->json(['message' => 'Recruitment not found'], 404); |
|
37 | + } |
|
37 | 38 | |
38 | 39 | return new ApplyFormResource($source->recruitment); |
39 | 40 | } |
@@ -41,8 +42,9 @@ discard block |
||
41 | 42 | public function apply(CandidatesCreateRequest $request) |
42 | 43 | { |
43 | 44 | $source = Source::where('key', $request->get('key'))->get()->first(); |
44 | - if (empty($source)) |
|
45 | - return response()->json(['message' => 'Recruitment not found'], 404); |
|
45 | + if (empty($source)) { |
|
46 | + return response()->json(['message' => 'Recruitment not found'], 404); |
|
47 | + } |
|
46 | 48 | |
47 | 49 | $candidate = CandidateCreator::createCandidate($request, $this->tenantManager); |
48 | 50 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | protected function registerDatabaseConnector($manager) |
14 | 14 | { |
15 | - $manager->addConnector('database', function () { |
|
15 | + $manager->addConnector('database', function() { |
|
16 | 16 | return new DatabaseConnector($this->app['db']); |
17 | 17 | }); |
18 | 18 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | protected function commands() |
37 | 37 | { |
38 | - $this->load(__DIR__.'/Commands'); |
|
38 | + $this->load(__DIR__ . '/Commands'); |
|
39 | 39 | |
40 | 40 | require base_path('routes/console.php'); |
41 | 41 | } |
@@ -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,7 +90,7 @@ 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 | }); |
@@ -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); |
@@ -70,6 +70,6 @@ discard block |
||
70 | 70 | $seeder->setConnection('tenant'); |
71 | 71 | $seeder->run(); |
72 | 72 | |
73 | - $this->info('Demo data have been seeded for tenant with subdomain \''.$tenant->subdomain.'\'.'); |
|
73 | + $this->info('Demo data have been seeded for tenant with subdomain \'' . $tenant->subdomain . '\'.'); |
|
74 | 74 | } |
75 | 75 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $tenantUser->username = $user->email; |
35 | 35 | $tenantUser->tenant_id = $tenant->id; |
36 | 36 | |
37 | - DB::transaction(function () use ($tenantUser, $user, $invitation) { |
|
37 | + DB::transaction(function() use ($tenantUser, $user, $invitation) { |
|
38 | 38 | $tenantUser->save(); |
39 | 39 | $user->save(); |
40 | 40 | $invitation->save(); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | $invitation->token = null; |
72 | 72 | |
73 | - DB::transaction(function () use ($user, $invitation) { |
|
73 | + DB::transaction(function() use ($user, $invitation) { |
|
74 | 74 | $user->save(); |
75 | 75 | $invitation->save(); |
76 | 76 | }); |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | protected function mapWebRoutes() |
60 | 60 | { |
61 | 61 | Route::middleware('web') |
62 | - ->namespace($this->namespace) |
|
63 | - ->group(base_path('routes/web.php')); |
|
62 | + ->namespace($this->namespace) |
|
63 | + ->group(base_path('routes/web.php')); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | protected function mapApiRoutes() |
74 | 74 | { |
75 | 75 | Route::middleware('api') |
76 | - ->namespace($this->namespace) |
|
77 | - ->group(base_path('routes/api.php')); |
|
76 | + ->namespace($this->namespace) |
|
77 | + ->group(base_path('routes/api.php')); |
|
78 | 78 | } |
79 | 79 | } |