Code Duplication    Length = 3-3 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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