PHPackages                             passionator/basket - 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. passionator/basket

ActiveLibrary

passionator/basket
==================

taha haddane test for architech-labs-code-test

1.0(1y ago)02[3 PRs](https://github.com/rosmarflores/basket/pulls)MITPHPPHP ^8.2CI passing

Since Mar 20Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/rosmarflores/basket)[ Packagist](https://packagist.org/packages/passionator/basket)[ Docs](https://github.com/passionator/basket)[ GitHub Sponsors](https://github.com/passionator)[ RSS](/packages/passionator-basket/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (5)Used By (0)

Description
-----------

[](#description)

This is simple product basket implementation for the skill test.

1. It is initialised with the product catalogue, delivery charge rules in constructor.
2. There is an add method that takes the product code as a parameter
3. There is a total method that returns the total cost of the basket, taking into account the delivery and offer rules.

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

[](#installation)

You can install the package via composer:

```
composer require passionator/basket
```

Usage
-----

[](#usage)

```
use Passionator\Basket\BasketClass;

$basket = new BasketClass();

// You can add among of ['R01','G01','B01']
$basket->add('B01');
$basket->add('R01');
$basket->add('G01');

// you can calculate the total price
echo $basket->total();
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance71

Regular maintenance activity

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

421d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bff2b60a4ae712167002e97a440fe017cd6f1b4ebb4e4051c7b8bd39a97111b0?d=identicon)[passionate-laravel-dev](/maintainers/passionate-laravel-dev)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")[![rosmarflores](https://avatars.githubusercontent.com/u/190306264?v=4)](https://github.com/rosmarflores "rosmarflores (2 commits)")

---

Tags

basketphpbasketpassionator

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

PHPackages © 2026

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