php-extended / php-vote-first-past-the-post
Implementation of the voting method "first-past-the-post" (also known as "Scrutin uninominal majoritaire à un tour" in french).
Requires
- php: >=7.1
- php-extended/php-vote-object: ^3
- php-extended/polyfill-php80-stringable: >=1
Requires (Dev)
README
Implementation of the voting method "first-past-the-post" (also known as "Scrutin uninominal majoritaire à un tour" in french).
This implementation follows the wikipedia pages english french.
Installation
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-vote-first-past-the-post": "^3",
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
Basic Usage
This library provides the first-past-the-post voting method. This method is a plurality method that returns an election result with all the registered candidates sorted by their number of votes (or score).
License
MIT (See license file).