Code Duplication    Length = 8-8 lines in 2 locations

src/Graviton/SchemaBundle/SchemaUtils.php 2 locations

@@ 373-380 (lines=8) @@
370
                    }
371
                }
372
                $property->setRefCollection($urls);
373
            } elseif ($meta->getTypeOfField($field) === 'collection') {
374
                $itemSchema = new Schema();
375
                $property->setType('array');
376
                $itemSchema->setType($this->getCollectionItemType($meta->name, $field));
377
378
                $property->setItems($itemSchema);
379
                $property->setFormat(null);
380
            } elseif ($meta->getTypeOfField($field) === 'datearray') {
381
                $itemSchema = new Schema();
382
                $property->setType('array');
383
                $itemSchema->setType('string');
@@ 388-395 (lines=8) @@
385
386
                $property->setItems($itemSchema);
387
                $property->setFormat(null);
388
            } elseif ($meta->getTypeOfField($field) === 'hasharray') {
389
                $itemSchema = new Schema();
390
                $itemSchema->setType('object');
391
392
                $property->setType('array');
393
                $property->setItems($itemSchema);
394
                $property->setFormat(null);
395
            }
396
397
            if (in_array($meta->getTypeOfField($field), $property->getMinLengthTypes())) {
398
                // make sure a required field cannot be blank