1 | <?php |
||||
2 | |||||
3 | namespace Thinkstudeo\Rakshak\Traits; |
||||
4 | |||||
5 | trait HasRakshak |
||||
6 | { |
||||
7 | use HasRoles; |
||||
8 | |||||
9 | /** |
||||
10 | * Route notifications for the Mail channel. |
||||
11 | * |
||||
12 | * @param \Illuminate\Notifications\Notification $notification |
||||
13 | * @return string |
||||
14 | */ |
||||
15 | public function routeNotificationForMail($notification) |
||||
0 ignored issues
–
show
|
|||||
16 | { |
||||
17 | return $this->email; |
||||
18 | } |
||||
19 | |||||
20 | /** |
||||
21 | * Route notifications for the Nexmo channel. |
||||
22 | * |
||||
23 | * @param \Illuminate\Notifications\Notification $notification |
||||
24 | * @return string |
||||
25 | */ |
||||
26 | public function routeNotificationForNexmo($notification) |
||||
0 ignored issues
–
show
The parameter
$notification is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
27 | { |
||||
28 | return $this->mobile; |
||||
29 | } |
||||
30 | |||||
31 | /** |
||||
32 | * Route notifications for the Textlocal channel. |
||||
33 | * |
||||
34 | * @param \Illuminate\Notifications\Notification $notification |
||||
35 | * @return string |
||||
36 | */ |
||||
37 | public function routeNotificationForTextlocal($notification) |
||||
0 ignored issues
–
show
The parameter
$notification is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
38 | { |
||||
39 | return $this->mobile; |
||||
40 | } |
||||
41 | |||||
42 | /** |
||||
43 | * Path to the User resource. |
||||
44 | * |
||||
45 | * @return string |
||||
46 | */ |
||||
47 | public function path() |
||||
48 | { |
||||
49 | return '/'.config('rakshak.route_prefix')."/users/{$this->{$this->getRouteKeyName()}}"; |
||||
0 ignored issues
–
show
It seems like
getRouteKeyName() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
50 | } |
||||
51 | } |
||||
52 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.