@@ -15,12 +15,12 @@ |
||
15 | 15 | * @property \Illuminate\Database\Eloquent\Collection $job_applications |
16 | 16 | * |
17 | 17 | */ |
18 | -class PreferredLanguage extends BaseModel { |
|
18 | +class PreferredLanguage extends BaseModel{ |
|
19 | 19 | |
20 | 20 | protected $fillable = []; |
21 | 21 | |
22 | - public function job_applications() { |
|
23 | - return $this->hasMany(\App\Models\JobApplication::class); |
|
22 | + public function job_applications(){ |
|
23 | + return $this->hasMany (\App\Models\JobApplication::class); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
@@ -16,12 +16,12 @@ |
||
16 | 16 | * Acessors: |
17 | 17 | * @property string $translation |
18 | 18 | */ |
19 | -class ReviewStatus extends BaseModel { |
|
19 | +class ReviewStatus extends BaseModel{ |
|
20 | 20 | |
21 | 21 | protected $fillable = []; |
22 | 22 | |
23 | - public function getTranslationAttribute() { |
|
24 | - return Lang::get('common/lookup/review_status')[$this->name]; |
|
23 | + public function getTranslationAttribute(){ |
|
24 | + return Lang::get ('common/lookup/review_status')[$this->name]; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | } |
@@ -15,12 +15,12 @@ |
||
15 | 15 | * @property \Illuminate\Database\Eloquent\Collection $job_applications |
16 | 16 | * |
17 | 17 | */ |
18 | -class VeteranStatus extends BaseModel { |
|
18 | +class VeteranStatus extends BaseModel{ |
|
19 | 19 | |
20 | 20 | protected $fillable = []; |
21 | 21 | |
22 | - public function job_applications() { |
|
23 | - return $this->hasMany(\App\Models\JobApplication::class); |
|
22 | + public function job_applications(){ |
|
23 | + return $this->hasMany (\App\Models\JobApplication::class); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | protected $table = 'course_status'; |
20 | 20 | protected $fillable = []; |
21 | 21 | |
22 | - public function courses() { |
|
23 | - return $this->hasMany(\App\Models\Course::class); |
|
22 | + public function courses(){ |
|
23 | + return $this->hasMany (\App\Models\Course::class); |
|
24 | 24 | } |
25 | 25 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | protected $fillable = []; |
20 | 20 | |
21 | - public function degrees() { |
|
22 | - return $this->hasMany(\App\Models\Degree::class); |
|
21 | + public function degrees(){ |
|
22 | + return $this->hasMany (\App\Models\Degree::class); |
|
23 | 23 | } |
24 | 24 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | * |
15 | 15 | * @property \Illuminate\Database\Eloquent\Collection $skills |
16 | 16 | */ |
17 | -class SkillType extends BaseModel { |
|
17 | +class SkillType extends BaseModel{ |
|
18 | 18 | |
19 | 19 | protected $fillable = [ |
20 | 20 | 'name' |
21 | 21 | ]; |
22 | 22 | |
23 | - public function skills() { |
|
24 | - return $this->hasMany(\App\Models\Skill::class); |
|
23 | + public function skills(){ |
|
24 | + return $this->hasMany (\App\Models\Skill::class); |
|
25 | 25 | } |
26 | 26 | } |
@@ -24,22 +24,22 @@ |
||
24 | 24 | * @property string $question |
25 | 25 | * @property string $description |
26 | 26 | */ |
27 | -class ApplicantProfileQuestion extends BaseModel { |
|
27 | +class ApplicantProfileQuestion extends BaseModel{ |
|
28 | 28 | |
29 | 29 | protected $fillable = []; |
30 | 30 | |
31 | - public function applicant_profile_answers() { |
|
32 | - return $this->hasMany(\App\Models\ApplicantProfileAnswer::class); |
|
31 | + public function applicant_profile_answers(){ |
|
32 | + return $this->hasMany (\App\Models\ApplicantProfileAnswer::class); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // Accessors |
36 | 36 | |
37 | - public function getQuestionAttribute() { |
|
38 | - return Lang::get('common/lookup/applicant_profile_questions')[$this->name]['question']; |
|
37 | + public function getQuestionAttribute(){ |
|
38 | + return Lang::get ('common/lookup/applicant_profile_questions')[$this->name]['question']; |
|
39 | 39 | } |
40 | 40 | |
41 | - public function getDescriptionAttribute() { |
|
42 | - return Lang::get('common/lookup/applicant_profile_questions')[$this->name]['description']; |
|
41 | + public function getDescriptionAttribute(){ |
|
42 | + return Lang::get ('common/lookup/applicant_profile_questions')[$this->name]['description']; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * |
21 | 21 | * @property \App\Models\User $user |
22 | 22 | */ |
23 | -class ProfilePic extends BaseModel { |
|
23 | +class ProfilePic extends BaseModel{ |
|
24 | 24 | |
25 | 25 | protected $casts = [ |
26 | 26 | 'user_id' => 'int', |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | 'image' |
32 | 32 | ]; |
33 | 33 | |
34 | - public function user() { |
|
35 | - return $this->belongsTo(\App\Models\User::class); |
|
34 | + public function user(){ |
|
35 | + return $this->belongsTo (\App\Models\User::class); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use Jenssegers\Date\Date; |
10 | 10 | use DateTime; |
11 | 11 | |
12 | -abstract class BaseModel extends Eloquent { |
|
12 | +abstract class BaseModel extends Eloquent{ |
|
13 | 13 | //Override date functions to return Jenssegers Data instead of Carbon |
14 | 14 | |
15 | 15 | /** |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | */ |
31 | 31 | protected function asDateTime($value) |
32 | 32 | { |
33 | - $timezone = Config::get('app.timezone'); |
|
33 | + $timezone = Config::get ('app.timezone'); |
|
34 | 34 | |
35 | 35 | // If this value is already a Carbon instance, we shall just return it as is. |
36 | 36 | // This prevents us having to re-instantiate a Carbon instance when we know |
37 | 37 | // it already is one, which wouldn't be fulfilled by the DateTime check. |
38 | 38 | if ($value instanceof Carbon) { |
39 | - return Date::parse($value, $timezone); |
|
39 | + return Date::parse ($value, $timezone); |
|
40 | 40 | } |
41 | 41 | if ($value instanceof Date) { |
42 | 42 | return $value; |
@@ -45,35 +45,35 @@ discard block |
||
45 | 45 | // these checks since they will be a waste of time, and hinder performance |
46 | 46 | // when checking the field. We will just return the DateTime right away. |
47 | 47 | if ($value instanceof DateTimeInterface) { |
48 | - return new Date( |
|
48 | + return new Date ( |
|
49 | 49 | //$value->format('Y-m-d H:i:s.u'), $value->getTimeZone() |
50 | - $value->format('Y-m-d H:i:s.u'), $timezone |
|
50 | + $value->format ('Y-m-d H:i:s.u'), $timezone |
|
51 | 51 | ); |
52 | 52 | } |
53 | 53 | // If this value is an integer, we will assume it is a UNIX timestamp's value |
54 | 54 | // and format a Carbon object from this timestamp. This allows flexibility |
55 | 55 | // when defining your date fields as they might be UNIX timestamps here. |
56 | - if (is_numeric($value)) { |
|
57 | - return Date::createFromTimestamp($value, $timezone); |
|
56 | + if (is_numeric ($value)) { |
|
57 | + return Date::createFromTimestamp ($value, $timezone); |
|
58 | 58 | } |
59 | 59 | // If the value is in simply year, month, day format, we will instantiate the |
60 | 60 | // Carbon instances from that format. Again, this provides for simple date |
61 | 61 | // fields on the database, while still supporting Carbonized conversion. |
62 | - if (preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value)) { |
|
63 | - return Date::createFromFormat('Y-m-d', $value, $timezone)->startOfDay(); |
|
62 | + if (preg_match ('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value)) { |
|
63 | + return Date::createFromFormat ('Y-m-d', $value, $timezone)->startOfDay (); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | // If the date follows the api configured date format, use that. |
67 | - $apiFormat = Config::get('app.api_datetime_format'); |
|
68 | - $date = DateTime::createFromFormat($apiFormat, $value); |
|
69 | - if ($date && $date->format($apiFormat) == $value) { |
|
67 | + $apiFormat = Config::get ('app.api_datetime_format'); |
|
68 | + $date = DateTime::createFromFormat ($apiFormat, $value); |
|
69 | + if ($date && $date->format ($apiFormat) == $value) { |
|
70 | 70 | return $date; |
71 | 71 | } |
72 | 72 | |
73 | 73 | // Finally, we will just assume this date is in the format used by default on |
74 | 74 | // the database connection and use that format to create the Carbon object |
75 | 75 | // that is returned back out to the developers after we convert it here. |
76 | - return Date::createFromFormat($this->getDateFormat(), $value, $timezone); |
|
76 | + return Date::createFromFormat ($this->getDateFormat (), $value, $timezone); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -84,6 +84,6 @@ discard block |
||
84 | 84 | */ |
85 | 85 | protected function serializeDate(DateTimeInterface $date) |
86 | 86 | { |
87 | - return $date->format(Config::get('app.api_datetime_format')); |
|
87 | + return $date->format (Config::get ('app.api_datetime_format')); |
|
88 | 88 | } |
89 | 89 | } |