Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.96 KB

README.md

File metadata and controls

56 lines (35 loc) · 1.96 KB

Circular Buffer

Integrate Release Renew

Mutation Score Code Coverage Type Coverage

Latest Stable Version Total Downloads

Installation

💡 This is a great place for showing how to install the package, see below:

Run

$ composer require lctrs/circular-buffer

Usage

Creating an empty circular buffer of size eg. 2:

use Lctrs\CircularBuffer\CircularBuffer;

$buffer = CircularBuffer::ofCapacity(2);
$buffer->write('foo');
$buffer->read(); // foo

You can also create a prefilled buffer:

use Lctrs\CircularBuffer\CircularBuffer;

$buffer = CircularBuffer::prefilled(2, ['foo', 'bar']);

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.