Issues (215)

Exceptions/Validation/InvalidEmailException.php (4 issues)

1
<?php
2
3
namespace GloBee\PaymentApi\Exceptions\Validation;
4
5
class InvalidEmailException extends ValidationException
6
{
7
    /**
8
     * InvalidEmailException constructor.
9
     *
10
     * @param string $field
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
11
     * @param string $email
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
12
     */
13 2
    public function __construct($field, $email)
0 ignored issues
show
Type hint "string" missing for $field
Loading history...
Type hint "string" missing for $email
Loading history...
14
    {
15 2
        $message = sprintf('The %s must be a valid email address.', $field);
16
        $error = [
17 2
            'type' => 'invalid_email',
18
            'extra' => null,
19 2
            'field' => $field,
20 2
            'message' => $message,
21
        ];
22 2
        parent::__construct([$error], $message);
23 2
    }
24
}
25