Code Duplication    Length = 5-5 lines in 2 locations

src/system/PermissionsModule/Api/PermissionAlwaysApi.php 1 location

@@ 39-43 (lines=5) @@
36
     */
37
    public function accessLevelNames($level = null)
38
    {
39
        if (isset($level) && !is_numeric($level)) {
40
            throw new \InvalidArgumentException();
41
        } elseif (isset($level)) {
42
            $level = intval($level);
43
        }
44
45
        $accessNames = [
46
            ACCESS_INVALID => 'Invalid',

src/system/PermissionsModule/Api/PermissionApi.php 1 location

@@ 301-305 (lines=5) @@
298
     */
299
    public function accessLevelNames($level = null)
300
    {
301
        if (isset($level) && !is_numeric($level)) {
302
            throw new \InvalidArgumentException();
303
        } elseif (isset($level)) {
304
            $level = intval($level);
305
        }
306
307
        $accessNames = [
308
            ACCESS_INVALID => $this->translator->__('Invalid'),