Code Duplication    Length = 8-8 lines in 2 locations

Controllers/Backend/Connect.php 2 locations

@@ 905-912 (lines=8) @@
902
903
            $errors = $this->getExportAssignmentService()->exportBatchOfAllProducts($offset, $batchSize);
904
905
            if (!empty($errors)) {
906
                $this->View()->assign([
907
                    'success' => false,
908
                    'messages' => $errors
909
                ]);
910
911
                return;
912
            }
913
        } catch (\Exception $e) {
914
            $this->View()->assign([
915
                'success' => false,
@@ 1014-1021 (lines=8) @@
1011
            return;
1012
        }
1013
1014
        if (!empty($errors)) {
1015
            $this->View()->assign([
1016
                'success' => false,
1017
                'messages' => $errors
1018
            ]);
1019
1020
            return;
1021
        }
1022
1023
        $this->View()->assign([
1024
            'success' => true