@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @return void |
17 | 17 | */ |
18 | - public function __construct() |
|
18 | + public function __construct () |
|
19 | 19 | { |
20 | 20 | // |
21 | 21 | } |
@@ -26,22 +26,22 @@ discard block |
||
26 | 26 | * @param AppliationRetrieved $event |
27 | 27 | * @return void |
28 | 28 | */ |
29 | - public function handle(ApplicationRetrieved $event) |
|
29 | + public function handle (ApplicationRetrieved $event) |
|
30 | 30 | { |
31 | 31 | $application = $event->application; |
32 | 32 | |
33 | - if (Auth::check()) { |
|
34 | - $user = Auth::user(); |
|
33 | + if (Auth::check ()) { |
|
34 | + $user = Auth::user (); |
|
35 | 35 | |
36 | 36 | //Don't bother logging when an applicant views their own application |
37 | 37 | if ($application->applicant->user->id != $user->id) { |
38 | 38 | $applicationText = "{id=$application->id}"; |
39 | 39 | $userText = "{id=$user->id, email=$user->email}"; |
40 | - Log::notice("Application viewed: application $applicationText viewed by user $userText."); |
|
40 | + Log::notice ("Application viewed: application $applicationText viewed by user $userText."); |
|
41 | 41 | } |
42 | 42 | } else { |
43 | 43 | $applicationText = "{id=$application->id}"; |
44 | - Log::notice("Application retrieved: application $applicationText retrieved with no user logged in."); |
|
44 | + Log::notice ("Application retrieved: application $applicationText retrieved with no user logged in."); |
|
45 | 45 | } |
46 | 46 | } |
47 | 47 | } |
@@ -8,36 +8,36 @@ |
||
8 | 8 | class WhichPortal |
9 | 9 | { |
10 | 10 | |
11 | - public function isApplicantPortal() |
|
11 | + public function isApplicantPortal () |
|
12 | 12 | { |
13 | - return !$this->isManagerPortal() && !$this->isAdminPortal(); |
|
13 | + return !$this->isManagerPortal () && !$this->isAdminPortal (); |
|
14 | 14 | } |
15 | 15 | |
16 | - public function isManagerPortal() |
|
16 | + public function isManagerPortal () |
|
17 | 17 | { |
18 | - $url = URL::current(); |
|
19 | - return $this->urlIsManagerPortal($url); |
|
18 | + $url = URL::current (); |
|
19 | + return $this->urlIsManagerPortal ($url); |
|
20 | 20 | } |
21 | 21 | |
22 | - public function isAdminPortal() |
|
22 | + public function isAdminPortal () |
|
23 | 23 | { |
24 | - $url = URL::current(); |
|
25 | - return $this->urlIsAdminPortal($url); |
|
24 | + $url = URL::current (); |
|
25 | + return $this->urlIsAdminPortal ($url); |
|
26 | 26 | } |
27 | 27 | |
28 | - public function urlIsManagerPortal($url): bool |
|
28 | + public function urlIsManagerPortal ($url): bool |
|
29 | 29 | { |
30 | - $baseUrl = config('app.url'); |
|
31 | - $managerPrefix = config('app.manager_prefix'); |
|
30 | + $baseUrl = config ('app.url'); |
|
31 | + $managerPrefix = config ('app.manager_prefix'); |
|
32 | 32 | $managerPattern = "#^$baseUrl/(\w+/)?$managerPrefix(/.*)?$#"; |
33 | - return preg_match($managerPattern, $url); |
|
33 | + return preg_match ($managerPattern, $url); |
|
34 | 34 | } |
35 | 35 | |
36 | - public function urlIsAdminPortal($url): bool |
|
36 | + public function urlIsAdminPortal ($url): bool |
|
37 | 37 | { |
38 | - $baseUrl = config('app.url'); |
|
39 | - $adminPrefix = config('backpack.base.route_prefix', 'admin'); |
|
38 | + $baseUrl = config ('app.url'); |
|
39 | + $adminPrefix = config ('backpack.base.route_prefix', 'admin'); |
|
40 | 40 | $adminPattern = "#^$baseUrl/(\w+/)?$adminPrefix(/.*)?$#"; |
41 | - return preg_match($adminPattern, $url); |
|
41 | + return preg_match ($adminPattern, $url); |
|
42 | 42 | } |
43 | 43 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @param string $className |
21 | 21 | */ |
22 | - public function __construct(string $className) |
|
22 | + public function __construct (string $className) |
|
23 | 23 | { |
24 | 24 | $this->className = $className; |
25 | 25 | } |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | * @param mixed $value |
32 | 32 | * @return bool |
33 | 33 | */ |
34 | - public function passes($attribute, $value) |
|
34 | + public function passes ($attribute, $value) |
|
35 | 35 | { |
36 | 36 | $model = $this->className; |
37 | - return $model::where('id', $value)->exists(); |
|
37 | + return $model::where ('id', $value)->exists (); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @return string |
44 | 44 | */ |
45 | - public function message() |
|
45 | + public function message () |
|
46 | 46 | { |
47 | - return Lang::get('validation.invalid_id'); |
|
47 | + return Lang::get ('validation.invalid_id'); |
|
48 | 48 | } |
49 | 49 | } |
@@ -9,13 +9,13 @@ |
||
9 | 9 | |
10 | 10 | class PasswordCorrectRule implements Rule |
11 | 11 | { |
12 | - public function passes($attribute, $value) |
|
12 | + public function passes ($attribute, $value) |
|
13 | 13 | { |
14 | - return Hash::check($value, Auth::user()->getAuthPassword()); |
|
14 | + return Hash::check ($value, Auth::user ()->getAuthPassword ()); |
|
15 | 15 | } |
16 | 16 | |
17 | - public function message() |
|
17 | + public function message () |
|
18 | 18 | { |
19 | - return Lang::get('validation.password_correct'); |
|
19 | + return Lang::get ('validation.password_correct'); |
|
20 | 20 | } |
21 | 21 | } |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | * @param mixed $value |
27 | 27 | * @return boolean |
28 | 28 | */ |
29 | - public function passes($attribute, $value) |
|
29 | + public function passes ($attribute, $value) |
|
30 | 30 | { |
31 | - return preg_match('/' . self::PATTERN . '/', $value); |
|
31 | + return preg_match ('/'.self::PATTERN.'/', $value); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return string |
38 | 38 | */ |
39 | - public function message() |
|
39 | + public function message () |
|
40 | 40 | { |
41 | - return Lang::get('validation.custom.twitter_handle'); |
|
41 | + return Lang::get ('validation.custom.twitter_handle'); |
|
42 | 42 | } |
43 | 43 | } |
@@ -19,13 +19,13 @@ |
||
19 | 19 | * https://laraveldaily.com/how-to-create-custom-validation-rules-laravel/ |
20 | 20 | */ |
21 | 21 | |
22 | - public function passes($attribute, $value) { |
|
22 | + public function passes ($attribute, $value) { |
|
23 | 23 | $passwordPattern = "~^.*(?=.{3,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[.!@#$%^&*]).*$~"; |
24 | - return preg_match($passwordPattern, $value); |
|
24 | + return preg_match ($passwordPattern, $value); |
|
25 | 25 | } |
26 | 26 | |
27 | - public function message() { |
|
28 | - return Lang::get('validation.custom.password'); |
|
27 | + public function message () { |
|
28 | + return Lang::get ('validation.custom.password'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * @param string $relation |
19 | 19 | * @return void |
20 | 20 | */ |
21 | - public function __construct($applicant, $relation) |
|
21 | + public function __construct ($applicant, $relation) |
|
22 | 22 | { |
23 | 23 | $this->applicant = $applicant; |
24 | 24 | $this->relation = $relation; |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | * @param [type] $value [description] |
31 | 31 | * @return [type] [description] |
32 | 32 | */ |
33 | - public function passes($attribute, $value) |
|
33 | + public function passes ($attribute, $value) |
|
34 | 34 | { |
35 | - return $this->applicant->getRelationValue($this->relation) |
|
36 | - ->pluck('id')->contains($value); |
|
35 | + return $this->applicant->getRelationValue ($this->relation) |
|
36 | + ->pluck ('id')->contains ($value); |
|
37 | 37 | } |
38 | 38 | |
39 | - public function message() |
|
39 | + public function message () |
|
40 | 40 | { |
41 | - return Lang::get('validation.applicant_has_relation'); |
|
41 | + return Lang::get ('validation.applicant_has_relation'); |
|
42 | 42 | } |
43 | 43 | } |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | * @param mixed $value |
22 | 22 | * @return boolean |
23 | 23 | */ |
24 | - public function passes($attribute, $value) |
|
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 | /** |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @return string |
33 | 33 | */ |
34 | - public function message() |
|
34 | + public function message () |
|
35 | 35 | { |
36 | - return Lang::get('validation.custom.linkedin_url'); |
|
36 | + return Lang::get ('validation.custom.linkedin_url'); |
|
37 | 37 | } |
38 | 38 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param string $relation |
18 | 18 | * @return void |
19 | 19 | */ |
20 | - public function __construct($validator) |
|
20 | + public function __construct ($validator) |
|
21 | 21 | { |
22 | 22 | $this->validator = $validator; |
23 | 23 | } |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | * @param [type] $value [description] |
30 | 30 | * @return boolean [description] |
31 | 31 | */ |
32 | - public function passes($attribute, $value) |
|
32 | + public function passes ($attribute, $value) |
|
33 | 33 | { |
34 | - return $value->contains(function ($object) { |
|
35 | - $object->getRelationValue($this->relationName)->is($this->relationValue); |
|
34 | + return $value->contains (function ($object) { |
|
35 | + $object->getRelationValue ($this->relationName)->is ($this->relationValue); |
|
36 | 36 | }); |
37 | 37 | } |
38 | 38 | |
39 | - public function message() |
|
39 | + public function message () |
|
40 | 40 | { |
41 | - return Lang::get('validation.contains_object_with_relation', ['relation' => $this->relationName]); |
|
41 | + return Lang::get ('validation.contains_object_with_relation', ['relation' => $this->relationName]); |
|
42 | 42 | } |
43 | 43 | } |