Code Duplication    Length = 5-5 lines in 2 locations

src/Intraface/Intranet.php 1 location

@@ 134-138 (lines=5) @@
131
                $result->free();
132
            }
133
134
            if (!empty($this->modules[$module])) {
135
                $module_id = $this->modules[$module];
136
            } else {
137
                throw new Exception('intranet says invalid module name '.$module);
138
            }
139
        } else {
140
            $module_id = intval($module);
141
        }

src/Intraface/User.php 1 location

@@ 200-204 (lines=5) @@
197
                $this->modules[$row['name']] = $row['id'];
198
            }
199
        }
200
        if (!empty($this->modules[$module])) {
201
            return $module_id = $this->modules[$module];
202
        } else {
203
            throw new Exception('user says unknown module ' . $module);
204
        }
205
    }
206
207
    /**