Code Duplication    Length = 9-11 lines in 4 locations

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/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

@@ 110-120 (lines=11) @@
107
    /**
108
     * @param null|object $attributes
109
     */
110
    public function __construct($attributes = null)
111
    {
112
        if (null !== $attributes) {
113
            if (isset($attributes->Code)) {
114
                $this->setCode($attributes->Code);
115
            }
116
            if (isset($attributes->Description)) {
117
                $this->setDescription($attributes->Description);
118
            }
119
        }
120
    }
121
122
    /**
123
     * @return array

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