Code Duplication    Length = 16-16 lines in 2 locations

module/Core/src/Core/Service/EntityEraser/BaseEvent.php 1 location

@@ 70-85 (lines=16) @@
67
        parent::setParam($name, $value);
68
    }
69
70
    public function setParams($params)
71
    {
72
        if (is_array($params) || $params instanceOf \ArrayAccess) {
73
            if (isset($params['repositories'])) {
74
                $this->setRepositories($params['repositories']);
75
                unset($params['repositories']);
76
            }
77
        } else if (is_object($params)) {
78
            if (isset($params->repositories)) {
79
                $this->setRepositories($params->repositories);
80
                unset($params->repositories);
81
            }
82
        }
83
84
        parent::setParams($params);
85
    }
86
87
}
88

module/Core/src/Core/Service/EntityEraser/DependencyResultEvent.php 1 location

@@ 155-170 (lines=16) @@
152
        parent::setParam($name, $value);
153
    }
154
155
    public function setParams($params)
156
    {
157
        if (is_array($params) || $params instanceOf \ArrayAccess) {
158
            if (isset($params['entity'])) {
159
                $this->setEntity($params['entity']);
160
                unset($params['entity']);
161
            }
162
        } else if (is_object($params)) {
163
            if (isset($params->entity)) {
164
                $this->setEntity($params->entity);
165
                unset($params->entity);
166
            }
167
        }
168
169
        parent::setParams($params);
170
    }
171
}
172