Code Duplication    Length = 3-3 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

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