Skip to content

Typical scale conversion as Interfaces constants for PHP

License

Notifications You must be signed in to change notification settings

flavioheleno/scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scale

Scale is a suite of interfaces that can be used to replace hard-coded constants.

Installation

To use Scale, simple run:

composer require flavioheleno/scale

Usage

This library usage is straightforward.

// before
usleep(30000);

// after
usleep(30 * Milliseconds::IN_MICROSECONDS)
// before
$item->expiresAfter(86400);

// after
$item->expiresAfter(Days::IN_SECONDS);

License

This library is licensed under the MIT License.