AmazonErrors::getError()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
/**
4
 * Part of the AmazonGiftCode package.
5
 * Author: Kashyap Merai <[email protected]>
6
 *
7
 */
8
9
10
namespace kamerk22\AmazonGiftCode\Exceptions;
11
12
13
use RuntimeException;
14
15
class AmazonErrors extends RuntimeException
16
{
17
    /**
18
     * @param string $message
19
     * @param string $_error_code
20
     * @return AmazonErrors
21
     */
22
    public static function getError(string $message, string $_error_code): self
23
    {
24
        return new static($message, $_error_code);
0 ignored issues
show
Bug introduced by
$_error_code of type string is incompatible with the type integer expected by parameter $code of kamerk22\AmazonGiftCode\...onErrors::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

24
        return new static($message, /** @scrutinizer ignore-type */ $_error_code);
Loading history...
25
    }
26
27
}