Code Duplication    Length = 12-12 lines in 2 locations

src/Transfer/EzPlatform/Repository/Manager/LocationManager.php 2 locations

@@ 183-194 (lines=12) @@
180
    /**
181
     * {@inheritdoc}
182
     */
183
    public function createOrUpdate(ObjectInterface $object)
184
    {
185
        if (!$object instanceof LocationObject) {
186
            throw new UnsupportedObjectOperationException(LocationObject::class, get_class($object));
187
        }
188
189
        if ($this->find($object)) {
190
            return $this->update($object);
191
        } else {
192
            return $this->create($object);
193
        }
194
    }
195
196
    /**
197
     * Creates/updates/deletes locations in ContentObject->parent_locations.
@@ 251-262 (lines=12) @@
248
    /**
249
     * {@inheritdoc}
250
     */
251
    public function remove(ObjectInterface $object)
252
    {
253
        if (!$object instanceof LocationObject) {
254
            throw new UnsupportedObjectOperationException(LocationObject::class, get_class($object));
255
        }
256
257
        if ($location = $this->find($object)) {
258
            $this->locationService->deleteLocation($location);
259
        }
260
261
        return true;
262
    }
263
264
    /**
265
     * Hides a location.