Code Duplication    Length = 14-14 lines in 2 locations

module/Core/src/Core/Form/Container.php 2 locations

@@ 723-736 (lines=14) @@
720
     * get the form before the actual active
721
     * @return null
722
     */
723
    public function getActiveFormPrevious()
724
    {
725
        $key = null;
726
        $actualKey = $this->getActiveFormActual();
727
        if (isset($actualKey)) {
728
            $forms = array_keys($this->forms);
729
            $formsFlip =  array_flip($forms);
730
            $index = $formsFlip[$actualKey];
731
            if (0 < $index) {
732
                $key = $forms[$index-1];
733
            }
734
        }
735
        return $key;
736
    }
737
738
739
    /**
@@ 743-756 (lines=14) @@
740
     * Gets the form after the actual active
741
     * @return null
742
     */
743
    public function getActiveFormNext()
744
    {
745
        $key = null;
746
        $actualKey = $this->getActiveFormActual();
747
        if (isset($actualKey)) {
748
            $forms = array_keys($this->forms);
749
            $formsFlip =  array_flip($forms);
750
            $index = $formsFlip[$actualKey];
751
            if ($index < count($forms) - 1) {
752
                $key = $forms[$index+1];
753
            }
754
        }
755
        return $key;
756
    }
757
758
    /**
759
     * @param $key