Code Duplication    Length = 9-9 lines in 2 locations

app/Http/Controllers/Admin/helpdesk/EmailsController.php 1 location

@@ 297-305 (lines=9) @@
294
            'port'       => $port,
295
            'driver'     => $driver,
296
        ];
297
        foreach ($configs as $key => $config) {
298
            if (is_array($config)) {
299
                foreach ($config as $from) {
300
                    \Config::set('mail.'.$key, $config);
301
                }
302
            } else {
303
                \Config::set('mail.'.$key, $config);
304
            }
305
        }
306
    }
307
308
    public function getDriver($driver_id)

app/Http/Controllers/Common/PhpMailController.php 1 location

@@ 195-203 (lines=9) @@
192
            'port'       => $port,
193
            'driver'     => $protocol,
194
        ];
195
        foreach ($configs as $key => $config) {
196
            if (is_array($config)) {
197
                foreach ($config as $from) {
198
                    \Config::set('mail.'.$key, $config);
199
                }
200
            } else {
201
                \Config::set('mail.'.$key, $config);
202
            }
203
        }
204
    }
205
206
    public function setServices($emailid, $protocol)