@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | |
24 | 24 | $faker_fr = Faker\Factory::create('fr'); |
25 | 25 | |
26 | -$factory->define(User::class, function (Faker\Generator $faker) { |
|
26 | +$factory->define(User::class, function(Faker\Generator $faker){ |
|
27 | 27 | static $password; |
28 | 28 | |
29 | 29 | return [ |
30 | 30 | 'first_name' => $faker->firstName(), |
31 | 31 | 'last_name' => $faker->lastName(), |
32 | 32 | 'email' => $faker->unique()->safeEmail(), |
33 | - 'password' => $password ? : $password = Hash::make('password'), |
|
33 | + 'password' => $password ?: $password = Hash::make('password'), |
|
34 | 34 | 'is_confirmed' => 1, |
35 | 35 | 'user_role_id' => UserRole::where('name', 'basic')->first()->id, // Users should default to basic user role. |
36 | 36 | 'remember_token' => str_random(10), |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ]; |
39 | 39 | }); |
40 | 40 | |
41 | -$factory->state(User::class, 'upgradedManager', function (Faker\Generator $faker) { |
|
41 | +$factory->state(User::class, 'upgradedManager', function(Faker\Generator $faker){ |
|
42 | 42 | return [ |
43 | 43 | 'user_role_id' => UserRole::where('name', 'upgradedManager')->first()->id, |
44 | 44 | 'gov_email' => $faker->unique()->safeEmail(), |
@@ -57,20 +57,20 @@ discard block |
||
57 | 57 | 'is_priority' => true |
58 | 58 | ]); |
59 | 59 | |
60 | -$factory->define(Applicant::class, function (Faker\Generator $faker) { |
|
60 | +$factory->define(Applicant::class, function(Faker\Generator $faker){ |
|
61 | 61 | return [ |
62 | 62 | 'twitter_username' => $faker->firstName(), |
63 | 63 | 'linkedin_url' => null, |
64 | 64 | 'tagline' => $faker->paragraph(), |
65 | 65 | 'personal_website' => $faker->url(), |
66 | 66 | 'is_snapshot' => false, |
67 | - 'user_id' => function () { |
|
67 | + 'user_id' => function(){ |
|
68 | 68 | return factory(User::class)->states('applicant')->create()->id; |
69 | 69 | }, |
70 | 70 | ]; |
71 | 71 | }); |
72 | 72 | |
73 | -$factory->define(Manager::class, function (Faker\Generator $faker) use ($faker_fr) { |
|
73 | +$factory->define(Manager::class, function(Faker\Generator $faker) use ($faker_fr) { |
|
74 | 74 | return [ |
75 | 75 | 'twitter_username' => $faker->firstName(), |
76 | 76 | 'linkedin_url' => null, |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'development_opportunity_frequency_id' => Frequency::inRandomOrder()->first()->id, |
82 | 82 | 'refuse_low_value_work_frequency_id' => Frequency::inRandomOrder()->first()->id, |
83 | 83 | 'years_experience' => $faker->numberBetween(2, 25), |
84 | - 'user_id' => function () use ($faker) { |
|
84 | + 'user_id' => function() use ($faker) { |
|
85 | 85 | return factory(User::class)->create([ |
86 | 86 | 'gov_email' => $faker->unique()->safeEmail(), |
87 | 87 | ])->id; |
@@ -110,12 +110,12 @@ discard block |
||
110 | 110 | }); |
111 | 111 | |
112 | 112 | $factory->state(Manager::class, 'upgraded', [ |
113 | - 'user_id' => function () { |
|
113 | + 'user_id' => function(){ |
|
114 | 114 | return factory(User::class)->state('upgradedManager')->create()->id; |
115 | 115 | }, |
116 | 116 | ]); |
117 | 117 | |
118 | -$factory->afterCreating(Manager::class, function ($manager) : void { |
|
118 | +$factory->afterCreating(Manager::class, function($manager) : void { |
|
119 | 119 | $manager->team_culture()->save(factory(TeamCulture::class)->create([ |
120 | 120 | 'manager_id' => $manager->id, |
121 | 121 | ])); |
@@ -6,12 +6,12 @@ |
||
6 | 6 | use App\Models\User; |
7 | 7 | use Faker\Generator as Faker; |
8 | 8 | |
9 | -$factory->define(Comment::class, function (Faker $faker) { |
|
9 | +$factory->define(Comment::class, function(Faker $faker){ |
|
10 | 10 | return [ |
11 | - 'job_poster_id' => function () { |
|
11 | + 'job_poster_id' => function(){ |
|
12 | 12 | return factory(JobPoster::class)->create()->id; |
13 | 13 | }, |
14 | - 'user_id' => function () { |
|
14 | + 'user_id' => function(){ |
|
15 | 15 | return factory(User::class)->create()->id; |
16 | 16 | }, |
17 | 17 | 'comment' => $faker->sentence(), |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | public function submitted_applications() // phpcs:ignore |
368 | 368 | { |
369 | - return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function ($query): void { |
|
369 | + return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function($query): void { |
|
370 | 370 | $query->where('name', 'draft'); |
371 | 371 | }); |
372 | 372 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | public function getClassificationMessageAttribute() |
556 | 556 | { |
557 | 557 | if ($this->classification_id !== null && $this->classification_level !== null) { |
558 | - return $this->classification->key . '-0' . $this->classification_level; |
|
558 | + return $this->classification->key.'-0'.$this->classification_level; |
|
559 | 559 | } |
560 | 560 | return null; |
561 | 561 | } |
@@ -187,7 +187,7 @@ |
||
187 | 187 | public function getFullNameAttribute(): string |
188 | 188 | { |
189 | 189 | if ($this->user !== null) { |
190 | - return $this->user->first_name . ' ' . $this->user->last_name; |
|
190 | + return $this->user->first_name.' '.$this->user->last_name; |
|
191 | 191 | } |
192 | 192 | return ''; |
193 | 193 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | //Log when application is first created |
41 | - if($application->wasRecentlyCreated) { |
|
41 | + if ($application->wasRecentlyCreated) { |
|
42 | 42 | $applicationText = "{id=".$application->id.", status=".$application->application_status->name."}"; |
43 | 43 | |
44 | 44 | Log::notice("Application created: application ".$applicationText." has been created by user ".$userText); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function passes($attribute, $value) |
25 | 25 | { |
26 | - return preg_match('/' . self::PATTERN . '/', $value); |
|
26 | + return preg_match('/'.self::PATTERN.'/', $value); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // search $needle in process status |
61 | 61 | $result = array_filter( |
62 | 62 | $process_status, |
63 | - function ($var) use ($needle) { |
|
63 | + function($var) use ($needle) { |
|
64 | 64 | return strpos($var, $needle); |
65 | 65 | } |
66 | 66 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'user' => request()->user(), |
69 | 69 | 'requestUrl' => request()->url() |
70 | 70 | ]; |
71 | - $message = '419 CSRF Token Mismatch. ' . collect($logData)->toJson(); |
|
71 | + $message = '419 CSRF Token Mismatch. '.collect($logData)->toJson(); |
|
72 | 72 | Log::debug($message); |
73 | 73 | } |
74 | 74 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | return $exception->render($request); |
110 | 110 | } |
111 | 111 | if ($exception instanceof TokenMismatchException) { |
112 | - $newMessage = $exception->getMessage() . ' ' . Lang::get('errors.refresh_page'); |
|
112 | + $newMessage = $exception->getMessage().' '.Lang::get('errors.refresh_page'); |
|
113 | 113 | $modifiedException = new TokenMismatchException($newMessage, $exception->getCode(), $exception); |
114 | 114 | return parent::render($request, $modifiedException); |
115 | 115 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | // Ensure the user can make answers, question exists, and user is the owner of the question it answers. |
21 | 21 | if ($this->user()->can('create', RatingGuideAnswer::class)) { |
22 | - $questionId = (int) $this->input('rating_guide_question_id'); |
|
22 | + $questionId = (int)$this->input('rating_guide_question_id'); |
|
23 | 23 | if ($questionId) { |
24 | 24 | $question = RatingGuideQuestion::find($questionId); |
25 | 25 | return $question && $this->user()->can('update', $question); |