PHPackages                             austinw/selection-procedures - 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. austinw/selection-procedures

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

austinw/selection-procedures
============================

Selection procedures package for Laravel.

1.0.0(1y ago)04MITPHPPHP ^8.1CI passing

Since Apr 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AustinW/selection-procedures)[ Packagist](https://packagist.org/packages/austinw/selection-procedures)[ Docs](https://github.com/austinw/selection-procedures)[ RSS](/packages/austinw-selection-procedures/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (14)Versions (2)Used By (0)

Selection Procedures for Laravel
================================

[](#selection-procedures-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/68d5dbc9ab1cbb801664bfb207568659264f61083d248b6c1fba6eb3648f01df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61757374696e772f73656c656374696f6e2d70726f636564757265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/austinw/selection-procedures)[![GitHub Tests Action Status](https://camo.githubusercontent.com/15606c65f5ed841c0ba0eef145d33caaadf83cd5623f3b5760b9b79a83f769b8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61757374696e772f73656c656374696f6e2d70726f636564757265732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/austinw/selection-procedures/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3736344586001690969c25a6c29bbe25f4ad082059c916d0efe93cda256f0794/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61757374696e772f73656c656374696f6e2d70726f636564757265732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/austinw/selection-procedures/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1d4e4d48c948ddba9643451b8927b9d5738b8ebc658aee57e412833ea6ef16b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61757374696e772f73656c656374696f6e2d70726f636564757265732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/austinw/selection-procedures)

This package provides a flexible and powerful system for implementing selection procedures in Laravel applications. It enables developers to create, manage, and execute sophisticated selection processes with ease.

Overview
--------

[](#overview)

Selection Procedures is designed to help manage athlete ranking and selection processes for various sporting competitions. The package includes:

- Flexible configuration system for defining selection criteria
- Multiple pre-built calculation strategies for different types of competitions
- Support for various apparatus and divisions
- Comprehensive ranking algorithms
- Easy integration with existing Laravel applications

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

[](#installation)

You can install the package via composer:

```
composer require austinw/selection-procedures
```

After installation, publish the configuration file:

```
php artisan vendor:publish --tag="selection-procedures-config"
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use AustinW\SelectionProcedures\RankingService;
use Illuminate\Support\Collection;

// Get your results collection (must implement ResultContract)
$results = new Collection([/* your result objects */]);

// Inject or resolve the ranking service
$rankingService = app(RankingService::class);

// Get ranked athletes
$rankedAthletes = $rankingService->rank(
    'world_championships', // procedure key as defined in config
    'trampoline',         // apparatus
    'senior_elite',       // division
    $results              // collection of results
);

// Process ranked athletes
foreach ($rankedAthletes as $rankedAthlete) {
    echo $rankedAthlete->getAthlete()->getName() . ': ' . $rankedAthlete->getTotalPoints();
}
```

### Implementing Contracts

[](#implementing-contracts)

Your athlete and result classes should implement the provided interfaces:

```
use AustinW\SelectionProcedures\Contracts\AthleteContract;
use AustinW\SelectionProcedures\Contracts\ResultContract;

class Athlete implements AthleteContract
{
    // Implement required methods
    public function getId(): string
    {
        // Return unique athlete identifier
    }

    public function getName(): string
    {
        // Return athlete name
    }
}

class Result implements ResultContract
{
    // Implement required methods
    public function getAthlete(): AthleteContract
    {
        // Return the athlete object
    }

    public function getCompetitionId(): string
    {
        // Return unique competition identifier
    }

    public function getScore(): float
    {
        // Return the score
    }

    // Additional required methods...
}
```

Available Calculators
---------------------

[](#available-calculators)

The package comes with several pre-built calculators for different competition types:

- `WorldChampionshipsCalculator`: Selection procedures for World Championships
- `WorldGamesCalculator`: Selection procedures for World Games
- `WagcCalculator`: Selection procedures for World Age Group Competitions
- `JuniorPanAmCalculator`: Selection procedures for Junior Pan American Games
- `EDPCalculator`: Elite Development Program selection procedures
- `JumpStartCalculator`: Jump Start program selection procedures

Each calculator implements specialized ranking algorithms based on the requirements of the specific competition.

Extending the Package
---------------------

[](#extending-the-package)

### Creating Custom Calculators

[](#creating-custom-calculators)

You can create your own calculator by implementing the `ProcedureCalculatorContract` interface:

```
use AustinW\SelectionProcedures\Contracts\ProcedureCalculatorContract;

class MyCustomCalculator implements ProcedureCalculatorContract
{
    public function calculateRanking(string $apparatus, string $division, Collection $results, array $config): Collection
    {
        // Your custom ranking logic here

        return new Collection([/* ranked athletes */]);
    }
}
```

Then register your calculator in the config file:

```
// config/selection-procedures.php
'procedures' => [
    'my_custom_procedure' => [
        'name' => 'My Custom Selection Procedure',
        'calculator' => \App\Calculators\MyCustomCalculator::class,
        'divisions' => [
            'senior_elite' => [
                // Division-specific configuration
            ],
        ],
    ],
],
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Austin White](https://github.com/austinw)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

401d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9444ae0906d85682c4700758c9ac0b7903e693557da4b6a876c11eff026bbcdc?d=identicon)[AustinW](/maintainers/AustinW)

---

Top Contributors

[![AustinW](https://avatars.githubusercontent.com/u/333398?v=4)](https://github.com/AustinW "AustinW (5 commits)")

---

Tags

laravelaustinwselection-procedures

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/austinw-selection-procedures/health.svg)

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M626](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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