cline/volume

Volume and dimensional calculation utilities for PHP 8.4+

Installs: 354

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cline/volume

1.0.1 2025-10-30 14:10 UTC

This package is auto-updated.

Last update: 2025-10-30 14:11:18 UTC


README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

This library provides volume and dimensional calculation utilities for PHP 8.4+. It offers a flexible volume() function that returns a chainable Volume object with methods for unit conversions including cubic meters, floor meters, and loading meters.

Requirements

Requires PHP 8.4+

Installation

composer require cline/volume

Quick Start

use function Cline\Volume\volume;

// Create from array (default: centimeters)
$vol = volume([120, 80, 100]);

// Get measurements
$vol->centimeters()->value(); // 960000 cm³
$vol->meters()->value();      // 0.96 m³
$vol->loadingMeters()->value(); // 0.4 ldm
$vol->floorMeters()->value(); // 0.96 m²

Documentation

  • Basic Usage - Creating volumes, unit conversions, and working with value objects
  • Loading Meters - LDM calculations for cargo transportation
  • Floor Meters - Footprint area calculations
  • Validation - Input validation rules and error handling
  • Examples - Real-world usage patterns

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.