GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 13-13 lines in 2 locations

app/Console/Commands/UpdateEmailSettings.php 1 location

@@ 149-161 (lines=13) @@
146
        $bar = $this->output->createProgressBar(count($variables));
147
148
        $this->line('Writing new email environment configuration to file.');
149
        foreach ($variables as $key => $value) {
150
            if (str_contains($value, ' ') && ! str_contains($value, '"')) {
151
                $value = '"' . $value . '"';
152
            }
153
            $newValue = $key . '=' . $value . ' # DO NOT EDIT! set using pterodactyl:mail';
154
155
            if (preg_match_all('/^' . $key . '=(.*)$/m', $envContents) < 1) {
156
                $envContents = $envContents . "\n" . $newValue;
157
            } else {
158
                $envContents = preg_replace('/^' . $key . '=(.*)$/m', $newValue, $envContents);
159
            }
160
            $bar->advance();
161
        }
162
163
        file_put_contents($file, $envContents);
164
        $bar->finish();

app/Console/Commands/UpdateEnvironment.php 1 location

@@ 188-200 (lines=13) @@
185
186
        $bar = $this->output->createProgressBar(count($variables));
187
188
        foreach ($variables as $key => $value) {
189
            if (str_contains($value, ' ') && ! str_contains($value, '"')) {
190
                $value = '"' . $value . '"';
191
            }
192
            $newValue = $key . '=' . $value . ' # DO NOT EDIT! set using pterodactyl:env';
193
194
            if (preg_match_all('/^' . $key . '=(.*)$/m', $envContents) < 1) {
195
                $envContents = $envContents . "\n" . $newValue;
196
            } else {
197
                $envContents = preg_replace('/^' . $key . '=(.*)$/m', $newValue, $envContents);
198
            }
199
            $bar->advance();
200
        }
201
202
        file_put_contents($file, $envContents);
203
        $bar->finish();