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

VirtualVote   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 9
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A removeCandidates() 0 6 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