Completed
Push — master ( 9ee175...c01904 )
by Boudry
02:34
created

VirtualVote::removeCandidates()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
/*
3
    Condorcet PHP Class, with Schulze Methods and others !
4
5
    By Julien Boudry - MIT LICENSE (Please read LICENSE.txt)
6
    https://github.com/julien-boudry/Condorcet
7
*/
8
declare(strict_types=1);
9
10
namespace Condorcet\Algo\Tools;
11
12
use Condorcet\Vote;
13
14
class VirtualVote
15
{
16 1
    public static function removeCandidates (Vote $vote, array $candidatesList) : Vote
17
    {
18 1
        ($virtualVote = clone $vote)->removeCandidates($candidatesList);
19
20 1
        return $virtualVote;
21
    }
22
}
23