Code Duplication    Length = 9-10 lines in 2 locations

application/modules/translator/classes/PoFileManager.php 2 locations

@@ 142-150 (lines=9) @@
139
                }
140
141
                switch ($this->getDomainType($domain)) {
142
                    case 'modules':
143
                        $contains = array_filter(
144
                            self::$CURRENT_TEMPLATE_PATHS,
145
                            function ($path, $domain) {
146
                                return strstr($path, 'modules/' . $domain) ? TRUE : FALSE;
147
                            }
148
                        );
149
150
                        return (!empty($contains)) ? $template : $domain;
151
                    case 'main':
152
                        $contains = array_filter(
153
                            self::$CURRENT_TEMPLATE_PATHS,
@@ 151-160 (lines=10) @@
148
                        );
149
150
                        return (!empty($contains)) ? $template : $domain;
151
                    case 'main':
152
                        $contains = array_filter(
153
                            self::$CURRENT_TEMPLATE_PATHS,
154
                            function ($path) {
155
                                $main_path = 'system/language/form_validation';
156
                                return strstr($path, $main_path) ? TRUE : FALSE;
157
                            }
158
                        );
159
160
                        return (!empty($contains)) ? $template : $domain;
161
                    default :
162
                        return $domain;
163
                }