GoogleTrendsException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 16
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php declare(strict_types=1);
2
3
namespace GSoares\GoogleTrends\Error;
4
5
use Exception;
6
use Throwable;
7
8
/**
9
 * @author Gabriel Felipe Soares <[email protected]>
10
 */
11
class GoogleTrendsException extends Exception
12
{
13
    private const ERROR_CODE = 19980904; // Google's creation date
14
15 20
    public function __construct(string $message, Throwable $previous = null)
16
    {
17 20
        parent::__construct(
18 20
            sprintf(
19 20
                'GoogleTrends error: %s',
20 20
                $message
21
            ),
22 20
            self::ERROR_CODE,
23 20
            $previous
24
        );
25 20
    }
26
}
27