Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Code Duplication    Length = 12-14 lines in 2 locations

src/CrudTrait.php 2 locations

@@ 125-136 (lines=12) @@
122
        }
123
124
        // if a new file is uploaded, store it on disk and its filename in the database
125
        if ($request->hasFile($attribute_name) && $request->file($attribute_name)->isValid()) {
126
127
            // 1. Generate a new file name
128
            $file = $request->file($attribute_name);
129
            $new_file_name = md5($file->getClientOriginalName().time()).'.'.$file->getClientOriginalExtension();
130
131
            // 2. Move the new file to the correct path
132
            $file_path = $file->storeAs($destination_path, $new_file_name, $disk);
133
134
            // 3. Save the complete path to the database
135
            $this->attributes[$attribute_name] = $file_path;
136
        }
137
    }
138
139
    /**
@@ 173-186 (lines=14) @@
170
        }
171
172
        // if a new file is uploaded, store it on disk and its filename in the database
173
        if ($request->hasFile($attribute_name)) {
174
            foreach ($request->file($attribute_name) as $file) {
175
                if ($file->isValid()) {
176
                    // 1. Generate a new file name
177
                    $new_file_name = md5($file->getClientOriginalName().time()).'.'.$file->getClientOriginalExtension();
178
179
                    // 2. Move the new file to the correct path
180
                    $file_path = $file->storeAs($destination_path, $new_file_name, $disk);
181
182
                    // 3. Add the public path to the database
183
                    $attribute_value[] = $file_path;
184
                }
185
            }
186
        }
187
188
        $this->attributes[$attribute_name] = json_encode($attribute_value);
189
    }