Code Duplication    Length = 3-3 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 326-328 (lines=3) @@
323
324
        // CSRF check
325
        $token = SecurityToken::inst();
326
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
327
            return new HTTPResponse(null, 400);
328
        }
329
        $tmpFile = $data['Upload'];
330
        if (empty($data['ID']) || empty($tmpFile['name']) || !array_key_exists('Name', $data)) {
331
            return new HTTPResponse('Invalid request', 400);
@@ 232-234 (lines=3) @@
229
230
        // CSRF check
231
        $token = SecurityToken::inst();
232
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
233
            return new HTTPResponse(null, 400);
234
        }
235
236
        // Check parent record
237
        /** @var Folder $parentRecord */