Code Duplication    Length = 9-9 lines in 2 locations

lib/Doctrine/ODM/MongoDB/SchemaManager.php 2 locations

@@ 280-288 (lines=9) @@
277
     * @param string $documentName
278
     * @throws \InvalidArgumentException
279
     */
280
    public function deleteDocumentIndexes($documentName)
281
    {
282
        $class = $this->dm->getClassMetadata($documentName);
283
        if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) {
284
            throw new \InvalidArgumentException('Cannot delete document indexes for mapped super classes, embedded documents or query result documents.');
285
        }
286
287
        $this->dm->getDocumentCollection($documentName)->dropIndexes();
288
    }
289
290
    /**
291
     * Create all the mapped document collections in the metadata factory.
@@ 390-398 (lines=9) @@
387
     * @param string $documentName
388
     * @throws \InvalidArgumentException
389
     */
390
    public function dropDocumentDatabase($documentName)
391
    {
392
        $class = $this->dm->getClassMetadata($documentName);
393
        if ($class->isMappedSuperclass || $class->isEmbeddedDocument || $class->isQueryResultDocument) {
394
            throw new \InvalidArgumentException('Cannot drop document database for mapped super classes, embedded documents or query result documents.');
395
        }
396
397
        $this->dm->getDocumentDatabase($documentName)->drop();
398
    }
399
400
    /**
401
     * Determine if an index returned by MongoCollection::getIndexInfo() can be