Code Duplication    Length = 11-11 lines in 3 locations

Command/DocumentGenerateCommand.php 3 locations

@@ 456-466 (lines=11) @@
453
     * @return string
454
     * @throws \InvalidArgumentException
455
     */
456
    public function validatePropertyType($type)
457
    {
458
        if (!in_array($type, $this->getPropertyTypes())) {
459
            throw $this->getException(
460
                'The property type isn\'t valid ("%s" given, expecting one of following: %s)',
461
                [$type, implode(', ', $this->getPropertyTypes())]
462
            );
463
        }
464
465
        return $type;
466
    }
467
468
    /**
469
     * Validates document annotation
@@ 476-486 (lines=11) @@
473
     * @return string
474
     * @throws \InvalidArgumentException
475
     */
476
    public function validateDocumentAnnotation($annotation)
477
    {
478
        if (!in_array($annotation, $this->getDocumentAnnotations())) {
479
            throw $this->getException(
480
                'The document annotation isn\'t valid ("%s" given, expecting one of following: %s)',
481
                [$annotation, implode(', ', $this->getDocumentAnnotations())]
482
            );
483
        }
484
485
        return $annotation;
486
    }
487
488
    /**
489
     * Validates property annotation
@@ 496-506 (lines=11) @@
493
     * @return string
494
     * @throws \InvalidArgumentException
495
     */
496
    public function validatePropertyAnnotation($annotation)
497
    {
498
        if (!in_array($annotation, $this->getPropertyAnnotations())) {
499
            throw $this->getException(
500
                'The property annotation isn\'t valid ("%s" given, expecting one of following: %s)',
501
                [$annotation, implode(', ', $this->getPropertyAnnotations())]
502
            );
503
        }
504
505
        return $annotation;
506
    }
507
508
    /**
509
     * Returns formatted question