@@ -16,14 +16,14 @@ |
||
16 | 16 | * @param [type] $value [description] |
17 | 17 | * @return [type] [description] |
18 | 18 | */ |
19 | - public function passes($attribute, $value) |
|
19 | + public function passes ($attribute, $value) |
|
20 | 20 | { |
21 | - return SkillDeclaration::find($value) && |
|
22 | - SkillDeclaration::find($value)->applicant->user->id == Auth::user()->id; |
|
21 | + return SkillDeclaration::find ($value) && |
|
22 | + SkillDeclaration::find ($value)->applicant->user->id == Auth::user ()->id; |
|
23 | 23 | } |
24 | 24 | |
25 | - public function message() |
|
25 | + public function message () |
|
26 | 26 | { |
27 | - return Lang::get('validation.user_owns_skill_declaration'); |
|
27 | + return Lang::get ('validation.user_owns_skill_declaration'); |
|
28 | 28 | } |
29 | 29 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @param mixed[] $data The data to validate. |
11 | 11 | * @return void |
12 | 12 | */ |
13 | - public function validate(array $data): void; |
|
13 | + public function validate (array $data): void; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Returns a laravel validator object made with this data. |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param mixed[] $data Data to validate. |
19 | 19 | * @return \Illuminate\Validation\Validator |
20 | 20 | */ |
21 | - public function validator(array $data): \Illuminate\Validation\Validator; |
|
21 | + public function validator (array $data): \Illuminate\Validation\Validator; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Returns true if the validator passes. |
@@ -26,5 +26,5 @@ discard block |
||
26 | 26 | * @param mixed[] $data Data to validate. |
27 | 27 | * @return boolean |
28 | 28 | */ |
29 | - public function isValid(array $data): bool; |
|
29 | + public function isValid (array $data): bool; |
|
30 | 30 | } |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | * @param mixed[] $data The data to validate. |
13 | 13 | * @return void |
14 | 14 | */ |
15 | - public function validate(array $data): void |
|
15 | + public function validate (array $data): void |
|
16 | 16 | { |
17 | - $this->validator($data)->validate(); |
|
17 | + $this->validator ($data)->validate (); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @param mixed[] $data Data to validate. |
24 | 24 | * @return boolean |
25 | 25 | */ |
26 | - public function isValid(array $data) : bool |
|
26 | + public function isValid (array $data) : bool |
|
27 | 27 | { |
28 | - return $this->validator($data)->passes(); |
|
28 | + return $this->validator ($data)->passes (); |
|
29 | 29 | } |
30 | 30 | } |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | class RegistrationValidator |
9 | 9 | { |
10 | - public static function basicRules() |
|
10 | + public static function basicRules () |
|
11 | 11 | { |
12 | 12 | return [ |
13 | 13 | 'first_name' => 'required|string|max:255', |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | ]; |
23 | 23 | } |
24 | 24 | |
25 | - public static function managerRegistrationExtraRules() |
|
25 | + public static function managerRegistrationExtraRules () |
|
26 | 26 | { |
27 | 27 | return [ |
28 | 28 | 'department' => 'required|integer', |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | * @param array $data Incoming registration data. |
37 | 37 | * @return \Illuminate\Contracts\Validation\Validator |
38 | 38 | */ |
39 | - public static function userValidator(array $data) |
|
39 | + public static function userValidator (array $data) |
|
40 | 40 | { |
41 | - return Validator::make($data, self::basicRules()); |
|
41 | + return Validator::make ($data, self::basicRules ()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | * @param array $data Incoming registration data. |
48 | 48 | * @return \Illuminate\Contracts\Validation\Validator |
49 | 49 | */ |
50 | - public static function managerValidator(array $data) |
|
50 | + public static function managerValidator (array $data) |
|
51 | 51 | { |
52 | - $managerRules = array_merge(self::basicRules(), self::managerRegistrationExtraRules()); |
|
53 | - return Validator::make($data, $managerRules); |
|
52 | + $managerRules = array_merge (self::basicRules (), self::managerRegistrationExtraRules ()); |
|
53 | + return Validator::make ($data, $managerRules); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | * @param array $data Incoming registration data. |
60 | 60 | * @return \Illuminate\Contracts\Validation\Validator |
61 | 61 | */ |
62 | - public static function finalizeManagerValidator(array $data) |
|
62 | + public static function finalizeManagerValidator (array $data) |
|
63 | 63 | { |
64 | - return Validator::make($data, self::managerRegistrationExtraRules()); |
|
64 | + return Validator::make ($data, self::managerRegistrationExtraRules ()); |
|
65 | 65 | } |
66 | 66 | } |
@@ -6,12 +6,12 @@ discard block |
||
6 | 6 | |
7 | 7 | class PasswordValidator |
8 | 8 | { |
9 | - public function validate($request) |
|
9 | + public function validate ($request) |
|
10 | 10 | { |
11 | - abort(404, 'incomplete'); |
|
11 | + abort (404, 'incomplete'); |
|
12 | 12 | } |
13 | 13 | |
14 | - public function rules() |
|
14 | + public function rules () |
|
15 | 15 | { |
16 | 16 | return [ |
17 | 17 | 'password' => [ |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ]; |
22 | 22 | } |
23 | 23 | |
24 | - public function messages() { |
|
25 | - return Lang::get('validation.custom.password'); |
|
24 | + public function messages () { |
|
25 | + return Lang::get ('validation.custom.password'); |
|
26 | 26 | } |
27 | 27 | } |
@@ -22,23 +22,23 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Construct a new UpdateWorkSampleValidator |
24 | 24 | */ |
25 | - public function __construct() |
|
25 | + public function __construct () |
|
26 | 26 | { |
27 | - $this->fileTypeIds = FileType::all()->pluck('id')->toArray(); |
|
27 | + $this->fileTypeIds = FileType::all ()->pluck ('id')->toArray (); |
|
28 | 28 | } |
29 | 29 | /** |
30 | 30 | * Get the validation rules that apply to the request. |
31 | 31 | * |
32 | 32 | * @return mixed[] |
33 | 33 | */ |
34 | - public function rules() : array |
|
34 | + public function rules () : array |
|
35 | 35 | { |
36 | 36 | return [ |
37 | 37 | // Name validation |
38 | 38 | 'name' => 'required|string|max:191', |
39 | 39 | 'file_type_id' => [ |
40 | 40 | 'required', |
41 | - Rule::in($this->fileTypeIds) |
|
41 | + Rule::in ($this->fileTypeIds) |
|
42 | 42 | ], |
43 | 43 | 'url' => 'required|url', |
44 | 44 | 'description' => 'required|string', |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | * @param mixed[] $data Data to validate. |
56 | 56 | * @return Validator |
57 | 57 | */ |
58 | - public function validator(array $data) : \Illuminate\Validation\Validator |
|
58 | + public function validator (array $data) : \Illuminate\Validation\Validator |
|
59 | 59 | { |
60 | - return Validator::make($data, $this->rules()); |
|
60 | + return Validator::make ($data, $this->rules ()); |
|
61 | 61 | } |
62 | 62 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @param Applicant $applicant The applicant this profile is intended to belong to. |
26 | 26 | */ |
27 | - public function __construct(Applicant $applicant) |
|
27 | + public function __construct (Applicant $applicant) |
|
28 | 28 | { |
29 | 29 | $this->applicant = $applicant; |
30 | 30 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * |
35 | 35 | * @return mixed[] |
36 | 36 | */ |
37 | - public function rules() : array |
|
37 | + public function rules () : array |
|
38 | 38 | { |
39 | 39 | return [ |
40 | 40 | // Name validation. |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'email', |
50 | 50 | // Email may match existing email for this user, |
51 | 51 | // but must be unique if changed. |
52 | - Rule::unique('users', 'email')->ignore($this->applicant->user->id) |
|
52 | + Rule::unique ('users', 'email')->ignore ($this->applicant->user->id) |
|
53 | 53 | ], |
54 | 54 | |
55 | 55 | // Password validation. |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | * @param mixed[] $data Data to validate. |
98 | 98 | * @return Validator |
99 | 99 | */ |
100 | - public function validator(array $data) : \Illuminate\Validation\Validator |
|
100 | + public function validator (array $data) : \Illuminate\Validation\Validator |
|
101 | 101 | { |
102 | - return Validator::make($data, $this->rules()); |
|
102 | + return Validator::make ($data, $this->rules ()); |
|
103 | 103 | } |
104 | 104 | } |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Construct a new UpdateReferenceValidator |
24 | 24 | */ |
25 | - public function __construct() |
|
25 | + public function __construct () |
|
26 | 26 | { |
27 | - $this->relationshipIds = Relationship::all()->pluck('id')->toArray(); |
|
27 | + $this->relationshipIds = Relationship::all ()->pluck ('id')->toArray (); |
|
28 | 28 | } |
29 | 29 | /** |
30 | 30 | * Get the validation rules that apply to the request. |
31 | 31 | * |
32 | 32 | * @return mixed[] |
33 | 33 | */ |
34 | - public function rules() : array |
|
34 | + public function rules () : array |
|
35 | 35 | { |
36 | 36 | return [ |
37 | 37 | 'name' => 'required|string|max:191', |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ], |
44 | 44 | 'relationship_id' => [ |
45 | 45 | 'required', |
46 | - Rule::in($this->relationshipIds) |
|
46 | + Rule::in ($this->relationshipIds) |
|
47 | 47 | ], |
48 | 48 | 'description' => 'required|string', |
49 | 49 | |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | * @param mixed[] $data Data to validate. |
67 | 67 | * @return Validator |
68 | 68 | */ |
69 | - public function validator(array $data) : \Illuminate\Validation\Validator |
|
69 | + public function validator (array $data) : \Illuminate\Validation\Validator |
|
70 | 70 | { |
71 | - return Validator::make($data, $this->rules()); |
|
71 | + return Validator::make ($data, $this->rules ()); |
|
72 | 72 | } |
73 | 73 | } |
@@ -15,17 +15,17 @@ |
||
15 | 15 | * |
16 | 16 | * @return null |
17 | 17 | */ |
18 | - public static function validateUnpublished(JobPoster $jobPoster) |
|
18 | + public static function validateUnpublished (JobPoster $jobPoster) |
|
19 | 19 | { |
20 | - Validator::make( |
|
21 | - $jobPoster->toArray(), |
|
20 | + Validator::make ( |
|
21 | + $jobPoster->toArray (), |
|
22 | 22 | [ |
23 | 23 | 'published' => [ |
24 | 24 | 'required', |
25 | - Rule::in([false]) |
|
25 | + Rule::in ([false]) |
|
26 | 26 | ] |
27 | 27 | ] |
28 | - )->validate(); |
|
28 | + )->validate (); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | } |