Issues (215)

src/Exceptions/Validation/InvalidUrlException.php (4 issues)

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