1
0
This repository has been archived on 2023-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
dtux__serveur-vote-lalis/include/Condorcet/Documentation/Election Class/public Election--canAddCandidate.md

26 lines
662 B
Markdown
Raw Normal View History

2022-09-21 12:39:11 +02:00
## public Election::canAddCandidate
### Description
```php
public Election->canAddCandidate ( CondorcetPHP\Condorcet\Candidate|string $candidate ): bool
```
Check if a candidate is already registered. Uses strict Vote object comparison, but also string naming comparison in the election.
##### **candidate:** *```CondorcetPHP\Condorcet\Candidate|string```*
String or Condorcet/Vote object.
### Return value:
*(```bool```)* True if your candidate is available, false otherwise.
---------------------------------------
### Related method(s)
* [Election::addCandidate](../Election%20Class/public%20Election--addCandidate.md)