Code Duplication    Length = 3-3 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 241-243 (lines=3) @@
238
239
        // CSRF check
240
        $token = SecurityToken::inst();
241
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
242
            return new HTTPResponse(null, 400);
243
        }
244
245
        // Check parent record
246
        /** @var Folder $parentRecord */
@@ 335-337 (lines=3) @@
332
333
        // CSRF check
334
        $token = SecurityToken::inst();
335
        if (empty($data[$token->getName()]) || !$token->check($data[$token->getName()])) {
336
            return new HTTPResponse(null, 400);
337
        }
338
        $tmpFile = $data['Upload'];
339
        if (empty($data['ID']) || empty($tmpFile['name']) || !array_key_exists('Name', $data)) {
340
            return new HTTPResponse('Invalid request', 400);