Code Duplication    Length = 9-11 lines in 5 locations

src/Entity/LabelMethod.php 1 location

@@ 30-40 (lines=11) @@
27
    /**
28
     * @param null|object $attributes
29
     */
30
    public function __construct($attributes = null)
31
    {
32
        if (null !== $attributes) {
33
            if (isset($attributes->Code)) {
34
                $this->setCode($attributes->Code);
35
            }
36
            if (isset($attributes->Description)) {
37
                $this->setDescription($attributes->Description);
38
            }
39
        }
40
    }
41
42
    /**
43
     * @param null|DOMDocument $document

src/Entity/PackagingType.php 1 location

@@ 73-81 (lines=9) @@
70
     */
71
    private $description;
72
73
    public function __construct($attributes = null)
74
    {
75
        if (isset($attributes->Description)) {
76
            $this->setDescription($attributes->Description);
77
        }
78
        if (isset($attributes->Code)) {
79
            $this->setCode($attributes->Code);
80
        }
81
    }
82
83
    /**
84
     * @param null|DOMDocument $document

src/Entity/POA.php 1 location

@@ 27-37 (lines=11) @@
24
    /**
25
     * @param null|object $attributes
26
     */
27
    public function __construct($attributes = null)
28
    {
29
        if (null !== $attributes) {
30
            if (isset($attributes->Code)) {
31
                $this->setCode($attributes->Code);
32
            }
33
            if (isset($attributes->Description)) {
34
                $this->setDescription($attributes->Description);
35
            }
36
        }
37
    }
38
39
    /**
40
     * @param null|DOMDocument $document

src/Entity/UnitOfMeasurement.php 1 location

@@ 83-93 (lines=11) @@
80
    /**
81
     * @param null|array $attributes
82
     */
83
    public function __construct($attributes = null)
84
    {
85
        if (null !== $attributes) {
86
            if (isset($attributes->Code)) {
87
                $this->setCode($attributes->Code);
88
            }
89
            if (isset($attributes->Description)) {
90
                $this->setDescription($attributes->Description);
91
            }
92
        }
93
    }
94
95
    /**
96
     * @param null|DOMDocument $document

src/Entity/Service.php 1 location

@@ 126-136 (lines=11) @@
123
    /**
124
     * @param null|object $attributes
125
     */
126
    public function __construct($attributes = null)
127
    {
128
        if (null !== $attributes) {
129
            if (isset($attributes->Code)) {
130
                $this->setCode($attributes->Code);
131
            }
132
            if (isset($attributes->Description)) {
133
                $this->setDescription($attributes->Description);
134
            }
135
        }
136
    }
137
138
    /**
139
     * @return array