abbassmortazavi / inventory-library
A simple inventory management library.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/abbassmortazavi/inventory-library
Requires
- php: >=8.3
Requires (Dev)
- phpunit/phpunit: ^11.2
README
Package Instruction
Installation
# Inventory Library A simple PHP library for managing an inventory of items. ## Installation Install via Composer: composer require abbassmortazavi/inventory-library
Sample Code For Use it In Your Project
use InventoryLibrary\Inventory; require 'vendor/autoload.php'; $inventory = new Inventory(); // Add items $inventory->addItem('orange', 20); $inventory->addItem('peach', 5); // Remove items $inventory->removeItem('orange', 5); // Get stock echo $inventory->getStock('orange'); // Output: 15 echo $inventory->getStock('peach'); // Output: 5
Run Unit Tests
run this command in your command line : vendor/bin/phpunit