alecrabbit/php-cli-snake

Lightweight cli spinner with zero dependencies

Fund package maintenance!
Patreon

0.6.0 2020-12-19 18:42 UTC

This package is auto-updated.

Last update: 2024-12-05 20:34:17 UTC


README

Lightweight cli snake spinner with zero dependencies

PHP Version Build Status Appveyor Status Scrutinizer Code Quality Code Coverage Total Downloads

Latest Stable Version Packagist Pre Release Version Latest Unstable Version

License

advanced

Zero dependencies

"require": {
  "php": "^7.3 || ^8.0"
}

Installation

$ composer require alecrabbit/php-cli-snake

Quickstart

require_once __DIR__ . '/../vendor/autoload.php';

use AlecRabbit\Snake\Spinner;
use React\EventLoop\Factory;

$s = new Spinner();

$loop = Factory::create();

$loop->addPeriodicTimer($s->interval(), static function () use ($s) {
    $s->spin();
});

$s->begin();

$loop->run();

$s->end();

Usage

See examples

Feature comparision