Completed
Push — master ( 95e37c...1f9e9c )
by
unknown
03:55
created

BpostInvalidXmlResponseException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 5
loc 5
rs 9.4285
ccs 4
cts 4
cp 1
cc 2
eloc 3
nc 2
nop 3
crap 2
1
<?php
2
3
namespace Bpost\BpostApiClient\Exception\BpostApiResponseException;
4
5
use Bpost\BpostApiClient\Exception\BpostApiResponseException;
6
7
/**
8
 * Class BpostInvalidXmlResponseException
9
 * @package Bpost\BpostApiClient\Exception\BpostApiResponseException
10
 */
11 View Code Duplication
class BpostInvalidXmlResponseException extends BpostApiResponseException
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @param string     $message
15
     * @param int        $code
16
     * @param \Exception $previous
0 ignored issues
show
Documentation introduced by
Should the type for parameter $previous not be null|\Exception?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
17
     */
18 1
    public function __construct($message = "", $code = 0, \Exception $previous = null)
19
    {
20 1
        $message = 'Invalid XML-response' . (empty($message) ? '' : ': ' . $message);
21 1
        parent::__construct($message, $code, $previous);
22 1
    }
23
}
24