Code Duplication    Length = 8-8 lines in 2 locations

src/Graviton/SchemaBundle/SchemaUtils.php 2 locations

@@ 387-394 (lines=8) @@
384
                    }
385
                }
386
                $property->setRefCollection($urls);
387
            } elseif ($meta->getTypeOfField($field) === 'collection') {
388
                $itemSchema = new Schema();
389
                $property->setType('array');
390
                $itemSchema->setType($this->getCollectionItemType($meta->name, $field));
391
392
                $property->setItems($itemSchema);
393
                $property->setFormat(null);
394
            } elseif ($meta->getTypeOfField($field) === 'datearray') {
395
                $itemSchema = new Schema();
396
                $property->setType('array');
397
                $itemSchema->setType('string');
@@ 402-409 (lines=8) @@
399
400
                $property->setItems($itemSchema);
401
                $property->setFormat(null);
402
            } elseif ($meta->getTypeOfField($field) === 'hasharray') {
403
                $itemSchema = new Schema();
404
                $itemSchema->setType('object');
405
406
                $property->setType('array');
407
                $property->setItems($itemSchema);
408
                $property->setFormat(null);
409
            }
410
411
            if (in_array($meta->getTypeOfField($field), $property->getMinLengthTypes())) {
412
                // make sure a required field cannot be blank