Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 67 | public function __construct (Election $mother) |
|
28 | { |
||
29 | 67 | $this->_selfElection = $mother; |
|
30 | |||
31 | 67 | if (!is_null(static::$_maxCandidates) && $this->_selfElection->countCandidates() > static::$_maxCandidates) : |
|
32 | 2 | throw new CondorcetException(101, static::METHOD_NAME[0].' is configured to accept only '.static::$_maxCandidates.' candidates'); |
|
33 | endif; |
||
34 | 65 | } |
|
35 | |||
49 |