Code Duplication    Length = 8-8 lines in 2 locations

Model/Base64FileTrait.php 2 locations

@@ 124-131 (lines=8) @@
121
        $success = @fwrite($to, $from);
122
        fseek($to, $toPosition);
123
124
        if (!$success) {
125
            $error = error_get_last();
126
127
            throw new \RuntimeException(sprintf(
128
                'An error occurred while copying the value (%s).',
129
                $error['message']
130
            ));
131
        }
132
    }
133
134
    /**
@@ 158-165 (lines=8) @@
155
156
        fseek($to, $toPosition);
157
158
        if (!$success) {
159
            $error = error_get_last();
160
161
            throw new \RuntimeException(sprintf(
162
                'An error occurred while copying the value (%s).',
163
                $error['message']
164
            ));
165
        }
166
    }
167
}
168