AmazonErrors   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getError() 0 3 1
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
}