Completed
Push — master ( 930028...bfbe49 )
by Stefan
03:20
created

LabelImage   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 17.39%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 38
ccs 4
cts 23
cp 0.1739
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
C __construct() 0 25 8
1
<?php
2
3
namespace Ups\Entity;
4
5
class LabelImage
6
{
7
    public $LabelImageFormat;
8
    public $GraphicImage;
9
    public $HTMLImage;
10
    public $PDF417;
11
    public $InternationalSignatureGraphicImage;
12
    public $URL;
13
14
    /**
15
     * @param \stdClass|null $response
16
     */
17 3
    public function __construct(\stdClass $response = null)
18
    {
19 3
        $this->LabelImageFormat = new LabelImageFormat();
20
21 3
        if (null !== $response) {
22
            if (isset($response->LabelImageFormat)) {
23
                $this->LabelImageFormat = new LabelImageFormat($response->LabelImageFormat);
24
            }
25
            if (isset($response->GraphicImage)) {
26
                $this->GraphicImage = $response->GraphicImage;
27
            }
28
            if (isset($response->HTMLImage)) {
29
                $this->HTMLImage = $response->HTMLImage;
30
            }
31
            if (isset($response->PDF417)) {
32
                $this->PDF417 = $response->PDF417;
33
            }
34
            if (isset($response->InternationalSignatureGraphicImage)) {
35
                $this->InternationalSignatureGraphicImage = $response->InternationalSignatureGraphicImage;
36
            }
37
            if (isset($response->URL)) {
38
                $this->URL = $response->URL;
39
            }
40
        }
41 3
    }
42
}
43