Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 647-650 (lines=4) @@
644
645
        // Configure form to respond to validation errors with form schema
646
        // if requested via react.
647
        $form->setValidationResponseCallback(function() use ($form, $file) {
648
            $schemaId = Controller::join_links($this->Link('schema/FileEditForm'), $file->exists() ? $file->ID : '');
649
            return $this->getSchemaResponse($form, $schemaId);
650
        });
651
652
        return $form;
653
    }
@@ 1029-1032 (lines=4) @@
1026
        $handler = AddToCampaignHandler::create($this, $record);
1027
        $form = $handler->Form($record);
1028
1029
        $form->setValidationResponseCallback(function() use ($form, $id) {
1030
            $schemaId = Controller::join_links($this->Link('schema/AddToCampaignForm'), $id);
1031
            return $this->getSchemaResponse($form, $schemaId);
1032
        });
1033
1034
        return $form;
1035
    }