__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 3
crap 6
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Scout Extended.
7
 *
8
 * (c) Algolia Team <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace Algolia\ScoutExtended\Exceptions;
15
16
use RuntimeException;
17
use Throwable;
18
19
final class ModelNotDefinedInAggregatorException extends RuntimeException
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function __construct(string $message = '', int $code = 0, Throwable $previous = null)
25
    {
26
        if (empty($message)) {
27
            $message = 'Model not defined in aggregator.';
28
        }
29
30
        parent::__construct($message, $code, $previous);
31
    }
32
}
33