Code Duplication    Length = 3-3 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 200-202 (lines=3) @@
197
198
        // CSRF check
199
        $token = SecurityToken::inst();
200
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
201
            return new HTTPResponse(null, 400);
202
        }
203
204
        // Check parent record
205
        /** @var Folder $parentRecord */
@@ 289-291 (lines=3) @@
286
287
        // CSRF check
288
        $token = SecurityToken::inst();
289
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
290
            return new HTTPResponse(null, 400);
291
        }
292
        $tmpFile = $data['Upload'];
293
        if (empty($data['ID']) || empty($tmpFile['name']) || !array_key_exists('Name', $data)) {
294
            return new HTTPResponse('Invalid request', 400);