PHPackages                             benasg/bet - 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. benasg/bet

ActivePackage

benasg/bet
==========

Bet package

013PHP

Since May 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/BenasG/bet)[ Packagist](https://packagist.org/packages/benasg/bet)[ RSS](/packages/benasg-bet/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Bet
===

[](#bet)

Betslip validation composer package

Install
=======

[](#install)

```
composer require benasg/bet

```

Usage
=====

[](#usage)

```
use Benasg\Bet\Bet;

$response = (new Bet)->make($betslip);

```

Betslip example
===============

[](#betslip-example)

```
$betslip = [
    // type: int
    // (mandatory) unique player id in the system
    'player_id' => 1,

    // type: float
    // (mandatory) amount of money player wants to bet
    'stake_amount' => 10,

    // type: array
    // (optional) error codes of betslip level errors
    'errors' => [],

    // type: array
    // (mandatory) selection (events) on which player wants to bet
    'selections' => [
        [
            // type: int
            // (mandatory) selection (event) ID on which player want to bet
            'id' => 1,

            // type: float, max number of numbers after dot is 3
            // (mandatory) odds (coefficient) of our selection,
            'odds' => 1.601,

            // type: array
            // (optional) error codes of selection level errors
            'errors' => [],
        ],
        [
            // type: int
            // (mandatory) selection (event) ID on which player want to bet
            'id' => 2,

            // type: float, max number of numbers after dot is 3
            // (mandatory) odds (coefficient) of our selection,
            'odds' => 1.601,

            // type: array
            // (optional) error codes of selection level errors
            'errors' => [],
        ],
    ],
];

```

Available methods
=================

[](#available-methods)

```
isSuccess();

```

```
getBetslip();

```

```
getBetslip()->isValid();

```

```
getBetslip()->getBetslipArray();

```

```
getBetslip()->getPlayerId();

```

```
getBetslip()->getStakeAmount();

```

```
getBetslip()->getSelections();

```

```
getBetslip()->getExpectedWin();

```

```
getBetslip()->getGlobalErrors();

```

```
getBetslip()->getSelectionErrors();

```

```
getBetslip()->getErrors();

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/07fd14f2fefb50909c8e83ff5387f9d920fe44bfba48043a341b89628212c409?d=identicon)[Benasg](/maintainers/Benasg)

---

Top Contributors

[![BenasG](https://avatars.githubusercontent.com/u/3480343?v=4)](https://github.com/BenasG "BenasG (18 commits)")

### Embed Badge

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

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

PHPackages © 2026

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