Code Duplication    Length = 5-5 lines in 2 locations

app/Console/Commands/PlayerCreateInfo.php 1 location

@@ 121-125 (lines=5) @@
118
                            if (! $imp == '') {
119
                                $pl = new PlayerIndexjson();
120
                                $pl->gamefile_id = $toindex->id;
121
                                if (! ends_with(strtolower($imp), ['.exe', '.lmu', '.ldb', 'ini', '.dll', 'lmt', 'lsd'])) {
122
                                    $pl->key = preg_replace('/(\.\w+$)/', '', strtolower($imp));
123
                                } else {
124
                                    $pl->key = strtolower($imp);
125
                                }
126
                                $pl->value = $imp;
127
                                $pl->filename = 'www';
128
                                $pl->save();

app/Console/Commands/PT.php 1 location

@@ 93-97 (lines=5) @@
90
                                $rel = new PlayerFileGamefileRel();
91
                                $rel->gamefile_id = $gamefile->id;
92
93
                                if (! ends_with(strtolower($imp), ['.exe', '.lmu', '.ldb', 'ini', '.dll', 'lmt', 'lsd'])) {
94
                                    $rel->orig_filename = preg_replace('/(\.\w+$)/', '', strtolower($imp));
95
                                } else {
96
                                    $rel->orig_filename = strtolower($imp);
97
                                }
98
99
                                //Decompress data
100
                                $filedata = $zip->getFromIndex($i);