Completed
Push — master ( 6b4094...cc9a05 )
by Avtandil
03:04
created

ElasticSearchException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the Laravel Lodash package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
declare(strict_types=1);
11
12
namespace Longman\LaravelLodash\ElasticSearch;
13
14
use Exception;
15
16
class ElasticSearchException extends Exception
17
{
18
    protected $errors = [];
19
20
    public function __construct(string $message = '', array $errors = [])
21
    {
22
        parent::__construct($message);
23
        $this->errors = $errors;
24
    }
25
26
    public function getErrors(): array
27
    {
28
        return $this->errors;
29
    }
30
}
31