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.
@@ 252-263 (lines=12) @@
249
    /**
250
     * {@inheritdoc}
251
     */
252
    public function remove(ObjectInterface $object)
253
    {
254
        if (!$object instanceof LocationObject) {
255
            throw new UnsupportedObjectOperationException(LocationObject::class, get_class($object));
256
        }
257
258
        if ($location = $this->find($object)) {
259
            $this->locationService->deleteLocation($location);
260
        }
261
262
        return true;
263
    }
264
265
    /**
266
     * Hides a location.