PHPackages                             elorating/elorating - 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. elorating/elorating

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

elorating/elorating
===================

Generate ELO ratings for each of your players.

2.0.3(5y ago)24101MITPHPPHP ^7.0|^8.0

Since Jan 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/elijahcruz12/elo-rating-generator-php)[ Packagist](https://packagist.org/packages/elorating/elorating)[ RSS](/packages/elorating-elorating/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

ELO Rating Generating Class
===========================

[](#elo-rating-generating-class)

This is a simple class that allows you to generate an ELO rating for two chess players after a match. Defaults are set to make things even easier. It is also two Class file as well, so check out the source to see how simple it is to work with.

PLEASE NOTE THAT VERSION TWO IS NOT COMPATIBLE WITH VERSION ONE.

Installation
------------

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

```
composer require elorating/elorating

```

Usage
-----

[](#usage)

First, create two players with current ratings. This allows you to get their ratings in a quick way:

```
use EloRating\Player;

$player1 = new Player(1200);
$player2 = new Player(800);
```

Next create a match.

```
use EloRating\Game;

$match = new Game($player1, $player2);
```

If you chose to set the K for the ELO Score, you can, however the default K is 32:

```
$match->setK(16);
```

After the match is complete, you can set the score and run the count method to recaculate the new scores. The score is done for player one, then player two.

```
$match->setScore(0, 1)
   ->count();
```

Get players:

```
$player1 = $match->getPlayer1();
$player2 = $match->getPlayer2();
```

Get their new ratings after the match:

```
$newRating1 = $player1->getRating();
$newRating2 = $player2->getRating();
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

1972d ago

Major Versions

1.0.1 → 2.0.02021-01-17

PHP version history (2 changes)1.0.0PHP ^7.4|^8.0

2.0.0PHP ^7.0|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14031707?v=4)[Elijah Cruz](/maintainers/elijahcruz12)[@elijahcruz12](https://github.com/elijahcruz12)

---

Tags

chess

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elorating-elorating/health.svg)

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

###  Alternatives

[mwdelaney/sage-bootstrap4-navwalker

Bootstrap 4 Navbar component navwalker for Sage 9 based themes

7398.1k](/packages/mwdelaney-sage-bootstrap4-navwalker)

PHPackages © 2026

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