Code Duplication    Length = 13-15 lines in 2 locations

Classes/Module/ModuleLoader.php 2 locations

@@ 413-427 (lines=15) @@
410
    /**
411
     * @return string
412
     */
413
    protected function getIcon(): string
414
    {
415
        $moduleConfiguration = $this->getExistingMainConfiguration();
416
417
418
        if ($this->icon) {
419
            $icon = $this->icon;
420
        } elseif ($moduleConfiguration['icon']) { // existing configuration may override.
421
            $icon = $moduleConfiguration['icon'];
422
        } else {
423
            $icon = ''; //default value.
424
        }
425
426
        return $icon;
427
    }
428
429
    /**
430
     * @param string $mainModule
@@ 938-950 (lines=13) @@
935
    /**
936
     * @return string
937
     */
938
    protected function getAccess(): string
939
    {
940
        $moduleConfiguration = $this->getExistingMainConfiguration();
941
942
        if ($this->access !== null) {
943
            $access = $this->access;
944
        } elseif ($moduleConfiguration['access']) { // existing configuration may override.
945
            $access = $moduleConfiguration['access'];
946
        } else {
947
            $access = Access::USER; //default value.
948
        }
949
        return $access;
950
    }
951
952
    /**
953
     * @param string $access