Code Duplication    Length = 12-12 lines in 2 locations

lib/ComponentManager/Exception/MoodleException.php 1 location

@@ 60-71 (lines=12) @@
57
    /**
58
     * @inheritdoc AbstractException
59
     */
60
    public function getExceptionCodeName() {
61
        switch ($this->code) {
62
            case static::CODE_EXECUTION_FAILED:
63
                return 'Unable to execute a CLI script';
64
            case static::CODE_INVALID_ACTION:
65
                return 'Invalid action specified';
66
            case static::CODE_NOT_CONFIGURED:
67
                return 'The Moodle instance\'s configuration file did not define $CFG';
68
            case static::CODE_INVALID_STATE:
69
                return 'The MoodleInstallation instance was in an invalid state';
70
        }
71
    }
72
}
73

lib/ComponentManager/Exception/PlatformException.php 1 location

@@ 53-64 (lines=12) @@
50
    /**
51
     * @inheritdoc AbstractException
52
     */
53
    public function getExceptionCodeName() {
54
        switch ($this->code) {
55
            case static::CODE_UNKNOWN_PLATFORM:
56
                return 'Unknown platform';
57
58
            case static::CODE_MISSING_EXECUTABLE:
59
                return 'Required executable could not be found on PATH';
60
61
            case static::CODE_UNKNOWN_TEMP_DIRECTORY:
62
                return 'Attempted to remove an unknown temporary directory';
63
        }
64
    }
65
}
66