@@ -12,10 +12,10 @@ |
||
12 | 12 | * |
13 | 13 | * @return void |
14 | 14 | */ |
15 | - public function boot() |
|
15 | + public function boot () |
|
16 | 16 | { |
17 | - Broadcast::routes(); |
|
17 | + Broadcast::routes (); |
|
18 | 18 | |
19 | - require base_path('routes/channels.php'); |
|
19 | + require base_path ('routes/channels.php'); |
|
20 | 20 | } |
21 | 21 | } |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @return void |
65 | 65 | */ |
66 | - protected function defineGates(): void |
|
66 | + protected function defineGates (): void |
|
67 | 67 | { |
68 | - Gate::define('view-assessment-plan', function ($user, $jobPoster) { |
|
69 | - return $user->isAdmin() || |
|
70 | - $user->isManager() && $jobPoster->manager->user_id === $user->id; |
|
68 | + Gate::define ('view-assessment-plan', function ($user, $jobPoster) { |
|
69 | + return $user->isAdmin () || |
|
70 | + $user->isManager () && $jobPoster->manager->user_id === $user->id; |
|
71 | 71 | }); |
72 | 72 | } |
73 | 73 | |
74 | - public function register(): void |
|
74 | + public function register (): void |
|
75 | 75 | { |
76 | 76 | } |
77 | 77 | |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return void |
82 | 82 | */ |
83 | - public function boot(): void |
|
83 | + public function boot (): void |
|
84 | 84 | { |
85 | - $this->registerPolicies(); |
|
85 | + $this->registerPolicies (); |
|
86 | 86 | |
87 | - $this->defineGates(); |
|
87 | + $this->defineGates (); |
|
88 | 88 | } |
89 | 89 | } |
@@ -16,17 +16,17 @@ discard block |
||
16 | 16 | * |
17 | 17 | * @return void |
18 | 18 | */ |
19 | - public function boot() |
|
19 | + public function boot () |
|
20 | 20 | { |
21 | 21 | // A lower default string length for migrations is required for |
22 | 22 | // versions of MySQL < 5.7.7 |
23 | - Schema::defaultStringLength(191); |
|
23 | + Schema::defaultStringLength (191); |
|
24 | 24 | |
25 | 25 | // Force all routes and requests to use HTTPS |
26 | - $this->app['request']->server->set('HTTPS', config('app.force_https')); |
|
26 | + $this->app['request']->server->set ('HTTPS', config ('app.force_https')); |
|
27 | 27 | |
28 | 28 | // Used in DB for _type column of Polymorphic relationships |
29 | - Relation::morphMap([ |
|
29 | + Relation::morphMap ([ |
|
30 | 30 | 'applicant' => Applicant::class, |
31 | 31 | 'application' => JobApplication::class, |
32 | 32 | ]); |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return void |
39 | 39 | */ |
40 | - public function register() |
|
40 | + public function register () |
|
41 | 41 | { |
42 | - $this->app->singleton(WhichPortal::class, function ($app) { |
|
43 | - return new WhichPortal(); |
|
42 | + $this->app->singleton (WhichPortal::class, function ($app) { |
|
43 | + return new WhichPortal (); |
|
44 | 44 | }); |
45 | 45 | } |
46 | 46 | } |
@@ -39,9 +39,9 @@ |
||
39 | 39 | * |
40 | 40 | * @return void |
41 | 41 | */ |
42 | - public function boot(): void |
|
42 | + public function boot (): void |
|
43 | 43 | { |
44 | - parent::boot(); |
|
44 | + parent::boot (); |
|
45 | 45 | |
46 | 46 | // |
47 | 47 | } |
@@ -19,21 +19,21 @@ |
||
19 | 19 | * |
20 | 20 | * @return boolean |
21 | 21 | */ |
22 | - public static function isColumnNullable(string $column_name) : bool |
|
22 | + public static function isColumnNullable (string $column_name) : bool |
|
23 | 23 | { |
24 | 24 | // create an instance of the model to be able to get the table name |
25 | 25 | $instance = new static(); |
26 | - $conn = DB::connection($instance->getConnectionName()); |
|
27 | - $table = Config::get('database.connections.'.Config::get('database.default').'.pr e fix').$instance->getTable(); |
|
26 | + $conn = DB::connection ($instance->getConnectionName ()); |
|
27 | + $table = Config::get ('database.connections.'.Config::get ('database.default').'.pr e fix').$instance->getTable (); |
|
28 | 28 | // MongoDB columns are alway nullable |
29 | - if ($conn->getConfig()['driver'] === 'mongodb') { |
|
29 | + if ($conn->getConfig ()['driver'] === 'mongodb') { |
|
30 | 30 | return true; |
31 | 31 | } |
32 | 32 | // register the enum, json, jsonb, and citext column types, because Doctrine doesn't support it |
33 | - $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); |
|
34 | - $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array'); |
|
35 | - $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array'); |
|
36 | - $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('citext', 'string'); |
|
37 | - return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
33 | + $conn->getDoctrineSchemaManager ()->getDatabasePlatform ()->registerDoctrineTypeMapping ('enum', 'string'); |
|
34 | + $conn->getDoctrineSchemaManager ()->getDatabasePlatform ()->registerDoctrineTypeMapping ('json', 'json_array'); |
|
35 | + $conn->getDoctrineSchemaManager ()->getDatabasePlatform ()->registerDoctrineTypeMapping ('jsonb', 'json_array'); |
|
36 | + $conn->getDoctrineSchemaManager ()->getDatabasePlatform ()->registerDoctrineTypeMapping ('citext', 'string'); |
|
37 | + return !$conn->getDoctrineColumn ($table, $column_name)->getNotnull (); |
|
38 | 38 | } |
39 | 39 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @return void |
16 | 16 | */ |
17 | - public function __construct() |
|
17 | + public function __construct () |
|
18 | 18 | { |
19 | 19 | } |
20 | 20 | |
@@ -24,15 +24,15 @@ discard block |
||
24 | 24 | * @param JobSaved $event |
25 | 25 | * @return void |
26 | 26 | */ |
27 | - public function handle(JobSaved $event) |
|
27 | + public function handle (JobSaved $event) |
|
28 | 28 | { |
29 | 29 | $job = $event->job; |
30 | 30 | |
31 | 31 | // If job has just been created, log if its being published now |
32 | 32 | // If job is being modified, only want to log when it goes from unpublished to published |
33 | 33 | if (($job->wasRecentlyCreated && $job->published) || |
34 | - (!$job->wasRecentlyCreated && $job->published && !$job->getOriginal('published'))) { |
|
35 | - Log::notice('Job published: job {id='.$job->id.'} published by manager {id='.$job->manager->id.', email='.$job->manager->user->email.'}'); |
|
34 | + (!$job->wasRecentlyCreated && $job->published && !$job->getOriginal ('published'))) { |
|
35 | + Log::notice ('Job published: job {id='.$job->id.'} published by manager {id='.$job->manager->id.', email='.$job->manager->user->email.'}'); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @return void |
16 | 16 | */ |
17 | - public function __construct() |
|
17 | + public function __construct () |
|
18 | 18 | { |
19 | 19 | // |
20 | 20 | } |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | * @param Login $event |
27 | 27 | * @return void |
28 | 28 | */ |
29 | - public function handle(Login $event) |
|
29 | + public function handle (Login $event) |
|
30 | 30 | { |
31 | 31 | $user = $event->user; |
32 | - Log::notice("Login by user {id=".$user->id.", email=".$user->email.", role=".$user->user_role->name."}"); |
|
32 | + Log::notice ("Login by user {id=".$user->id.", email=".$user->email.", role=".$user->user_role->name."}"); |
|
33 | 33 | } |
34 | 34 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @return void |
16 | 16 | */ |
17 | - public function __construct() |
|
17 | + public function __construct () |
|
18 | 18 | { |
19 | 19 | // |
20 | 20 | } |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | * @param UserUpdated $event |
26 | 26 | * @return void |
27 | 27 | */ |
28 | - public function handle(UserUpdated $event) |
|
28 | + public function handle (UserUpdated $event) |
|
29 | 29 | { |
30 | - Log::notice("User updated: ".$event->user); |
|
30 | + Log::notice ("User updated: ".$event->user); |
|
31 | 31 | } |
32 | 32 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * |
13 | 13 | * @return void |
14 | 14 | */ |
15 | - public function __construct() |
|
15 | + public function __construct () |
|
16 | 16 | { |
17 | 17 | } |
18 | 18 | |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | * @param UserUpdated $event Fires after successful database update. |
23 | 23 | * @return void |
24 | 24 | */ |
25 | - public function handle(UserUpdated $event) : void |
|
25 | + public function handle (UserUpdated $event) : void |
|
26 | 26 | { |
27 | - if ($event->user->isManager() || |
|
28 | - $event->user->isAdmin() |
|
27 | + if ($event->user->isManager () || |
|
28 | + $event->user->isAdmin () |
|
29 | 29 | ) { |
30 | - $managerProfile = Manager::where('user_id', $event->user->id)->first(); |
|
30 | + $managerProfile = Manager::where ('user_id', $event->user->id)->first (); |
|
31 | 31 | if ($managerProfile === null) { |
32 | - $managerProfile = new Manager(); |
|
32 | + $managerProfile = new Manager (); |
|
33 | 33 | $managerProfile->user_id = $event->user->id; |
34 | - $managerProfile->save(); |
|
34 | + $managerProfile->save (); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | } |