| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Error implements ErrorInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | private $code; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $message; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $violations; |
||
| 26 | |||
| 27 | public function __construct(int $code, string $message, array $violations) |
||
| 28 | { |
||
| 29 | $this->code = $code; |
||
| 30 | $this->message = $message; |
||
| 31 | $this->violations = $violations; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return int |
||
| 36 | */ |
||
| 37 | public function getCode(): int |
||
| 38 | { |
||
| 39 | return $this->code; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getMessage(): string |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return array |
||
| 52 | */ |
||
| 53 | public function getViolations(): array |
||
| 56 | } |
||
| 57 | } |
||
| 58 |