Issues (215)

src/Exceptions/Validation/ValidationException.php (3 issues)

1
<?php
2
3
namespace GloBee\PaymentApi\Exceptions\Validation;
4
5
class ValidationException extends \InvalidArgumentException
6
{
7
    /**
8
     * @var array
9
     */
10
    private $errors;
11
12
    /**
13
     * ValidationException constructor.
14
     *
15
     * @param array  $errors
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
16
     * @param string $message
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
17
     */
18 16
    public function __construct(array $errors, $message = 'Validation Failed')
0 ignored issues
show
Type hint "string" missing for $message
Loading history...
19
    {
20 16
        parent::__construct($message);
21 16
        $this->errors = $errors;
22 16
    }
23
24
    /**
25
     * @return array
26
     */
27 1
    public function getErrors()
28
    {
29 1
        return $this->errors;
30
    }
31
}
32