PHPackages                             michaelcullum/voting-lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. michaelcullum/voting-lib

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michaelcullum/voting-lib
========================

130[5 issues](https://github.com/michaelcullum/voting-lib/issues)PHP

Since Aug 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/michaelcullum/voting-lib)[ Packagist](https://packagist.org/packages/michaelcullum/voting-lib)[ RSS](/packages/michaelcullum-voting-lib/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Voting Library
==============

[](#voting-library)

Currently this library just contains the code for an STV election following rules similar to that of [Scottish STV](http://www.legislation.gov.uk/sdsi/2011/9780111014639/pdfs/sdsi_9780111014639_en.pdf).

Documentation and stuff doesn't quite exist, and most of the STV working is done in `ElectionRunner.php`. References are provided throughout the codebase in comments with explanations on what it's doing with paragraph references to Scottish STV rules.

Scottish STV is used because it is well defined as it is defined in UK legislature.

The primary differences are its inability to look back on previous rounds to brea ties, so will select a random choice (which is the method Scottish STV always suggests in an event where two candidates are tied in all previous rounds). These elements and use of 'random' means that sometimes running an election count twice will produce slightly different results.

Code coverage is pretty good but the `ElectionRunner` class could use a little more unit testing.

Scrutinizer: [![Scrutinizer Code Quality](https://camo.githubusercontent.com/238bff17313d3ee47b54ffded8009012d34eab8317426bc783fcae505224007b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d69636861656c63756c6c756d2f766f74696e672d6c69622f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/michaelcullum/voting-lib/?branch=master)

Code Coverage: [![Code Coverage](https://camo.githubusercontent.com/ecd67d63d8d85e07e2d7f285e6384f828b0111525add42de55da89ba809adc8b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d69636861656c63756c6c756d2f766f74696e672d6c69622f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/michaelcullum/voting-lib/?branch=master)

Travis CI: [![Build Status](https://camo.githubusercontent.com/cf0ad61ee72834fd0700e5a384c0050673a017711278b3f0b22d0f878ac4ab97/68747470733a2f2f7472617669732d63692e6f72672f6d69636861656c63756c6c756d2f766f74696e672d6c69622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/michaelcullum/voting-lib)

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/51b8f5fa2478c474c026976512454ce9953323d2d07d0a5320b3a3bd3f4653d8?d=identicon)[michaelcullum](/maintainers/michaelcullum)

---

Top Contributors

[![michaelcullum](https://avatars.githubusercontent.com/u/211740?v=4)](https://github.com/michaelcullum "michaelcullum (94 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (7 commits)")

### Embed Badge

![Health badge](/badges/michaelcullum-voting-lib/health.svg)

```
[![Health](https://phpackages.com/badges/michaelcullum-voting-lib/health.svg)](https://phpackages.com/packages/michaelcullum-voting-lib)
```

###  Alternatives

[smile/module-store-delivery

Smile Store Delivery

23357.1k1](/packages/smile-module-store-delivery)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
