Code Duplication    Length = 4-4 lines in 2 locations

code/Controller/AssetAdmin.php 2 locations

@@ 711-714 (lines=4) @@
708
709
        // Configure form to respond to validation errors with form schema
710
        // if requested via react.
711
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id, $versionId) {
712
            $schemaId = Controller::join_links($this->Link('schema/fileHistoryForm'), $id, $versionId);
713
            return $this->getSchemaResponse($schemaId, $form, $errors);
714
        });
715
716
        return $form;
717
    }
@@ 1013-1016 (lines=4) @@
1010
        $handler = AddToCampaignHandler::create($this, $record, 'addToCampaignForm');
1011
        $form = $handler->Form($record);
1012
1013
        $form->setValidationResponseCallback(function (ValidationResult $errors) use ($form, $id) {
1014
            $schemaId = Controller::join_links($this->Link('schema/addToCampaignForm'), $id);
1015
            return $this->getSchemaResponse($schemaId, $form, $errors);
1016
        });
1017
1018
        return $form;
1019
    }