1 | <?php |
||||||
2 | |||||||
3 | namespace Propaganistas\LaravelDisposableEmail\Validation; |
||||||
4 | |||||||
5 | use Propaganistas\LaravelDisposableEmail\Facades\DisposableDomains; |
||||||
6 | |||||||
7 | class Indisposable |
||||||
8 | { |
||||||
9 | /** |
||||||
10 | * Default error message. |
||||||
11 | * |
||||||
12 | * @var string |
||||||
13 | */ |
||||||
14 | public static $errorMessage = 'Disposable email addresses are not allowed.'; |
||||||
15 | |||||||
16 | /** |
||||||
17 | * Validates whether an email address does not originate from a disposable email service. |
||||||
18 | * |
||||||
19 | * @param string $attribute |
||||||
20 | * @param mixed $value |
||||||
21 | * @param array $parameters |
||||||
22 | * @param \Illuminate\Validation\Validator $validator |
||||||
23 | * @return bool |
||||||
24 | */ |
||||||
25 | 9 | public function validate($attribute, $value, $parameters, $validator) |
|||||
0 ignored issues
–
show
The parameter
$attribute 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. ![]() The parameter
$parameters 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. ![]() |
|||||||
26 | { |
||||||
27 | 9 | return DisposableDomains::isNotDisposable($value); |
|||||
0 ignored issues
–
show
The method
isNotDisposable() does not exist on Propaganistas\LaravelDis...cades\DisposableDomains . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
28 | } |
||||||
29 | } |
||||||
30 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.