@@ -27,11 +27,11 @@ |
||
27 | 27 | Validator::make($degreeValidator->getAttributes(), [ |
28 | 28 | 'applicant_id' => [ |
29 | 29 | 'required', |
30 | - Rule::in($applicant_ids->toArray()), |
|
30 | + Rule::in($applicant_ids->toArray()), |
|
31 | 31 | ], |
32 | 32 | 'degree_type_id' => [ |
33 | 33 | 'required', |
34 | - Rule::in($this->degree_type_id->toArray()), |
|
34 | + Rule::in($this->degree_type_id->toArray()), |
|
35 | 35 | ] |
36 | 36 | |
37 | 37 | ])->validate(); |
@@ -15,26 +15,26 @@ |
||
15 | 15 | public function __construct(Applicant $applicant) |
16 | 16 | { |
17 | 17 | $this->applicant = $applicant; |
18 | - $this->degree_type_id = DegreeType::all()->pluck('id'); |
|
18 | + $this->degree_type_id = DegreeType::all ()->pluck ('id'); |
|
19 | 19 | |
20 | 20 | } |
21 | 21 | public function validate(DegreeValidator $degreeValidator) |
22 | 22 | { |
23 | - $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $degreeValidator->id); |
|
23 | + $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $degreeValidator->id); |
|
24 | 24 | //This array is reset every time because applicants table can change frequently |
25 | - $applicant_ids = Applicant::all()->pluck('id'); |
|
25 | + $applicant_ids = Applicant::all ()->pluck ('id'); |
|
26 | 26 | //Validate basic data is filled in |
27 | - Validator::make($degreeValidator->getAttributes(), [ |
|
27 | + Validator::make ($degreeValidator->getAttributes (), [ |
|
28 | 28 | 'applicant_id' => [ |
29 | 29 | 'required', |
30 | - Rule::in($applicant_ids->toArray()), |
|
30 | + Rule::in ($applicant_ids->toArray ()), |
|
31 | 31 | ], |
32 | 32 | 'degree_type_id' => [ |
33 | 33 | 'required', |
34 | - Rule::in($this->degree_type_id->toArray()), |
|
34 | + Rule::in ($this->degree_type_id->toArray ()), |
|
35 | 35 | ] |
36 | 36 | |
37 | - ])->validate(); |
|
37 | + ])->validate (); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | } |
@@ -25,13 +25,13 @@ |
||
25 | 25 | //Validate basic data is filled in |
26 | 26 | Validator::make($courseValidator->getAttributes(), [ |
27 | 27 | 'applicant_id' => [ |
28 | - 'required', |
|
28 | + 'required', |
|
29 | 29 | Rule::in($applicant_ids->toArray()), |
30 | - ], |
|
31 | - 'course_status_id' => [ |
|
32 | - 'required', |
|
30 | + ], |
|
31 | + 'course_status_id' => [ |
|
32 | + 'required', |
|
33 | 33 | Rule::in($this->course_status_ids->toArray()), |
34 | - ] |
|
34 | + ] |
|
35 | 35 | |
36 | 36 | ])->validate(); |
37 | 37 | } |
@@ -15,25 +15,25 @@ |
||
15 | 15 | public function __construct(Applicant $applicant) |
16 | 16 | { |
17 | 17 | $this->applicant = $applicant; |
18 | - $this->course_status_ids = CourseStatus::all()->pluck('id'); |
|
18 | + $this->course_status_ids = CourseStatus::all ()->pluck ('id'); |
|
19 | 19 | } |
20 | 20 | public function validate(CourseValidator $courseValidator) |
21 | 21 | { |
22 | - $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $courseValidator->id); |
|
22 | + $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $courseValidator->id); |
|
23 | 23 | //This array is reset every time because applicants table can change frequently |
24 | - $applicant_ids = Applicant::all()->pluck('id'); |
|
24 | + $applicant_ids = Applicant::all ()->pluck ('id'); |
|
25 | 25 | //Validate basic data is filled in |
26 | - Validator::make($courseValidator->getAttributes(), [ |
|
26 | + Validator::make ($courseValidator->getAttributes (), [ |
|
27 | 27 | 'applicant_id' => [ |
28 | 28 | 'required', |
29 | - Rule::in($applicant_ids->toArray()), |
|
29 | + Rule::in ($applicant_ids->toArray ()), |
|
30 | 30 | ], |
31 | 31 | 'course_status_id' => [ |
32 | 32 | 'required', |
33 | - Rule::in($this->course_status_ids->toArray()), |
|
33 | + Rule::in ($this->course_status_ids->toArray ()), |
|
34 | 34 | ] |
35 | 35 | |
36 | - ])->validate(); |
|
36 | + ])->validate (); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function getFunctions(): array |
14 | 14 | { |
15 | 15 | return [ |
16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
16 | + new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
17 | 17 | ]; |
18 | 18 | } |
19 | 19 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function getFunctions(): array |
14 | 14 | { |
15 | 15 | return [ |
16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
16 | + new Twig_SimpleFunction ('handleNullState', [$this, 'handleNullState']), |
|
17 | 17 | ]; |
18 | 18 | } |
19 | 19 |
@@ -28,8 +28,8 @@ |
||
28 | 28 | * @property string $level_description The localized description of the skill level (accounts for skill type). |
29 | 29 | * |
30 | 30 | * Localized Properties: |
31 | - * @property string $description |
|
32 | - * @property string $specificity |
|
31 | + * @property string $description |
|
32 | + * @property string $specificity |
|
33 | 33 | */ |
34 | 34 | class Criteria extends BaseModel |
35 | 35 | { |
@@ -64,22 +64,22 @@ discard block |
||
64 | 64 | |
65 | 65 | public function criteria_type() //phpcs:ignore |
66 | 66 | { |
67 | - return $this->belongsTo(\App\Models\Lookup\CriteriaType::class); |
|
67 | + return $this->belongsTo (\App\Models\Lookup\CriteriaType::class); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | public function job_poster() //phpcs:ignore |
71 | 71 | { |
72 | - return $this->belongsTo(\App\Models\JobPoster::class); |
|
72 | + return $this->belongsTo (\App\Models\JobPoster::class); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | public function skill() |
76 | 76 | { |
77 | - return $this->belongsTo(\App\Models\Skill::class); |
|
77 | + return $this->belongsTo (\App\Models\Skill::class); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | public function skill_level() //phpcs:ignore |
81 | 81 | { |
82 | - return $this->belongsTo(\App\Models\Lookup\SkillLevel::class); |
|
82 | + return $this->belongsTo (\App\Models\Lookup\SkillLevel::class); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function assessments() // phpcs:ignore |
91 | 91 | { |
92 | - return $this->hasMany(\App\Models\Assessment::class, 'criterion_id'); |
|
92 | + return $this->hasMany (\App\Models\Assessment::class, 'criterion_id'); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | { |
102 | 102 | $level = $this->skill_level->name; |
103 | 103 | $type = $this->skill->skill_type->name; |
104 | - return Lang::get("common/lookup/skill_level.$level.$type.name"); |
|
104 | + return Lang::get ("common/lookup/skill_level.$level.$type.name"); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -113,6 +113,6 @@ discard block |
||
113 | 113 | { |
114 | 114 | $level = $this->skill_level->name; |
115 | 115 | $type = $this->skill->skill_type->name; |
116 | - return Lang::get("common/lookup/skill_level.$level.$type.description"); |
|
116 | + return Lang::get ("common/lookup/skill_level.$level.$type.description"); |
|
117 | 117 | } |
118 | 118 | } |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
176 | - * Check if the user has the specified role. |
|
177 | - * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | - * @return boolean |
|
179 | - */ |
|
176 | + * Check if the user has the specified role. |
|
177 | + * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | + * @return boolean |
|
179 | + */ |
|
180 | 180 | public function hasRole($role) |
181 | 181 | { |
182 | 182 | switch ($role) { |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | * Set this user to the specified role. |
196 | 196 | * |
197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
198 | - * @return void |
|
199 | - */ |
|
198 | + * @return void |
|
199 | + */ |
|
200 | 200 | public function setRole(string $role): void |
201 | 201 | { |
202 | 202 | $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * Returns a user's full name. |
232 | 232 | * |
233 | 233 | * @return string |
234 | - */ |
|
234 | + */ |
|
235 | 235 | public function getFullNameAttribute(): string |
236 | 236 | { |
237 | 237 | return $this->first_name . ' ' . $this->last_name; |
@@ -91,22 +91,22 @@ discard block |
||
91 | 91 | |
92 | 92 | public function applicant() //phpcs:ignore |
93 | 93 | { |
94 | - return $this->hasOne(\App\Models\Applicant::class); |
|
94 | + return $this->hasOne (\App\Models\Applicant::class); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public function manager() //phpcs:ignore |
98 | 98 | { |
99 | - return $this->hasOne(\App\Models\Manager::class); |
|
99 | + return $this->hasOne (\App\Models\Manager::class); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | public function profile_pic() //phpcs:ignore |
103 | 103 | { |
104 | - return $this->hasOne(\App\Models\ProfilePic::class); |
|
104 | + return $this->hasOne (\App\Models\ProfilePic::class); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public function user_role() //phpcs:ignore |
108 | 108 | { |
109 | - return $this->belongsTo(\App\Models\UserRole::class); |
|
109 | + return $this->belongsTo (\App\Models\UserRole::class); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public function setIsPriorityAttribute($value) |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function isUpgradedManager(): bool |
139 | 139 | { |
140 | - return $this->isAdmin() || $this->user_role->name === 'upgradedManager'; |
|
140 | + return $this->isAdmin () || $this->user_role->name === 'upgradedManager'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | public function isDemoManager(): bool |
149 | 149 | { |
150 | 150 | // Currently, every non-upgradedManager user can be considered a demoManager. |
151 | - return !$this->isUpgradedManager(); |
|
151 | + return !$this->isUpgradedManager (); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | public function isManager(): bool |
160 | 160 | { |
161 | 161 | // Currently, every user can use the Manager portal as a demoManager. |
162 | - return $this->isDemoManager() || $this->isUpgradedManager(); |
|
162 | + return $this->isDemoManager () || $this->isUpgradedManager (); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -181,11 +181,11 @@ discard block |
||
181 | 181 | { |
182 | 182 | switch ($role) { |
183 | 183 | case 'applicant': |
184 | - return $this->isApplicant(); |
|
184 | + return $this->isApplicant (); |
|
185 | 185 | case 'manager': |
186 | - return $this->isManager(); |
|
186 | + return $this->isManager (); |
|
187 | 187 | case 'admin': |
188 | - return $this->isAdmin(); |
|
188 | + return $this->isAdmin (); |
|
189 | 189 | default: |
190 | 190 | return false; |
191 | 191 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function setRole(string $role): void |
201 | 201 | { |
202 | - $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
|
202 | + $this->user_role ()->associate (UserRole::where ('name', $role)->firstOrFail ()); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public function sendPasswordResetNotification($token): void |
214 | 214 | { |
215 | - $this->notify(new ResetPasswordNotification($token)); |
|
215 | + $this->notify (new ResetPasswordNotification ($token)); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
@@ -234,6 +234,6 @@ discard block |
||
234 | 234 | */ |
235 | 235 | public function getFullNameAttribute(): string |
236 | 236 | { |
237 | - return $this->first_name . ' ' . $this->last_name; |
|
237 | + return $this->first_name.' '.$this->last_name; |
|
238 | 238 | } |
239 | 239 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @property \Jenssegers\Date\Date $created_at |
13 | 13 | * @property \Jenssegers\Date\Date $updated_at |
14 | 14 | */ |
15 | -class Frequency extends BaseModel { |
|
15 | +class Frequency extends BaseModel{ |
|
16 | 16 | |
17 | 17 | protected $fillable = []; |
18 | 18 |
@@ -5,16 +5,16 @@ |
||
5 | 5 | // -------------------------- |
6 | 6 | // This route file is loaded automatically by Backpack\Base. |
7 | 7 | // Routes you generate using Backpack\Generators will be placed here. |
8 | -Route::group([ |
|
9 | - 'prefix' => config('backpack.base.route_prefix', 'admin'), |
|
10 | - 'middleware' => ['web', config('backpack.base.middleware_key', 'admin')], |
|
8 | +Route::group ([ |
|
9 | + 'prefix' => config ('backpack.base.route_prefix', 'admin'), |
|
10 | + 'middleware' => ['web', config ('backpack.base.middleware_key', 'admin')], |
|
11 | 11 | 'namespace' => 'App\Http\Controllers\Admin', |
12 | 12 | ], function () : void { |
13 | 13 | // Custom admin routes. |
14 | - Route::crud('skill', 'SkillCrudController'); |
|
15 | - Route::crud('job-poster', 'JobPosterCrudController'); |
|
16 | - Route::crud('user', 'UserCrudController'); |
|
17 | - Route::crud('manager', 'ManagerCrudController'); |
|
18 | - Route::crud('department', 'DepartmentCrudController'); |
|
19 | - Route::crud('classification', 'ClassificationCrudController'); |
|
14 | + Route::crud ('skill', 'SkillCrudController'); |
|
15 | + Route::crud ('job-poster', 'JobPosterCrudController'); |
|
16 | + Route::crud ('user', 'UserCrudController'); |
|
17 | + Route::crud ('manager', 'ManagerCrudController'); |
|
18 | + Route::crud ('department', 'DepartmentCrudController'); |
|
19 | + Route::crud ('classification', 'ClassificationCrudController'); |
|
20 | 20 | }); |
@@ -57,11 +57,11 @@ |
||
57 | 57 | public function toMail($notifiable) |
58 | 58 | { |
59 | 59 | return (new MailMessage) |
60 | - ->subject(Lang::get('common/notifications/password_reset.subject')) |
|
61 | - ->greeting(Lang::get('common/notifications/password_reset.greeting')) |
|
62 | - ->line(Lang::get('common/notifications/password_reset.line_1')) |
|
63 | - ->action(Lang::get('common/notifications/password_reset.action'), url(route('password.reset', $this->token, false))) |
|
64 | - ->line(Lang::get('common/notifications/password_reset.line_2')) |
|
65 | - ->salutation(Lang::get('common/notifications/password_reset.salutation', ['name' => config('mail.from.name')])); |
|
60 | + ->subject (Lang::get ('common/notifications/password_reset.subject')) |
|
61 | + ->greeting (Lang::get ('common/notifications/password_reset.greeting')) |
|
62 | + ->line (Lang::get ('common/notifications/password_reset.line_1')) |
|
63 | + ->action (Lang::get ('common/notifications/password_reset.action'), url (route ('password.reset', $this->token, false))) |
|
64 | + ->line (Lang::get ('common/notifications/password_reset.line_2')) |
|
65 | + ->salutation (Lang::get ('common/notifications/password_reset.salutation', ['name' => config ('mail.from.name')])); |
|
66 | 66 | } |
67 | 67 | } |
@@ -23,17 +23,17 @@ |
||
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 | } |