Code Duplication    Length = 15-15 lines in 2 locations

lib/ElectionProcess/VotesProcess.php 2 locations

@@ 243-257 (lines=15) @@
240
241
            // Multiples
242
            $is_multiple = mb_strpos($line, '*');
243
            if ($is_multiple !== false) :
244
                $multiple = trim( substr($line, $is_multiple + 1) );
245
246
                // Errors
247
                if ( !is_numeric($multiple) ) :
248
                    throw new CondorcetException(13, null);
249
                endif;
250
251
                $multiple = intval($multiple);
252
253
                // Reformat line
254
                $line = substr($line, 0, $is_multiple);
255
            else :
256
                $multiple = 1;
257
            endif;
258
259
            // Vote Weight
260
            $is_voteWeight = mb_strpos($line, '^');
@@ 261-275 (lines=15) @@
258
259
            // Vote Weight
260
            $is_voteWeight = mb_strpos($line, '^');
261
            if ($is_voteWeight !== false) :
262
                $weight = trim( substr($line, $is_voteWeight + 1) );
263
264
                // Errors
265
                if ( !is_numeric($weight) ) :
266
                    throw new CondorcetException(13, null);
267
                endif;
268
269
                $weight = intval($weight);
270
271
                // Reformat line
272
                $line = substr($line, 0, $is_voteWeight);
273
            else :
274
                $weight = 1;
275
            endif;
276
277
            // Tags + vote
278
            if (mb_strpos($line, '||') !== false) :