Code Duplication    Length = 13-13 lines in 4 locations

src/Api/Args/Format/ArgsFormat.php 2 locations

@@ 418-430 (lines=13) @@
415
     *
416
     * @return Argument[] The arguments.
417
     */
418
    public function getArguments($includeBase = true)
419
    {
420
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
421
422
        $arguments = $this->arguments;
423
424
        if ($includeBase && $this->baseFormat) {
425
            // prepend base arguments
426
            $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
427
        }
428
429
        return $arguments;
430
    }
431
432
    /**
433
     * Returns whether the format contains a specific argument.
@@ 648-660 (lines=13) @@
645
     *
646
     * @return Option[] The options.
647
     */
648
    public function getOptions($includeBase = true)
649
    {
650
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
651
652
        $options = $this->options;
653
654
        if ($includeBase && $this->baseFormat) {
655
            // append base options
656
            $options = array_replace($options, $this->baseFormat->getOptions());
657
        }
658
659
        return $options;
660
    }
661
662
    /**
663
     * Returns whether the format contains a specific option.

src/Api/Args/Format/ArgsFormatBuilder.php 2 locations

@@ 701-713 (lines=13) @@
698
     *
699
     * @return Argument[] The arguments.
700
     */
701
    public function getArguments($includeBase = true)
702
    {
703
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
704
705
        $arguments = $this->arguments;
706
707
        if ($includeBase && $this->baseFormat) {
708
            // prepend base arguments
709
            $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
710
        }
711
712
        return $arguments;
713
    }
714
715
    /**
716
     * Sets the options of the built format.
@@ 889-901 (lines=13) @@
886
     *
887
     * @return Option[] The options.
888
     */
889
    public function getOptions($includeBase = true)
890
    {
891
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
892
893
        $options = $this->options;
894
895
        if ($includeBase && $this->baseFormat) {
896
            // append base options
897
            $options = array_replace($options, $this->baseFormat->getOptions());
898
        }
899
900
        return $options;
901
    }
902
903
    /**
904
     * Builds a format with the arguments and options added to the builder.