2017 © Pedro Peláez
 

library clock

image

scyzoryck/clock

  • Friday, April 6, 2018
  • by scyzoryck
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Clock

Did you ever wonder how to control your time? This library is created for you! It provides a Clock interface that allows you to create current datetime in a controlled way!, (*1)

Installing

composer require scyzoryck/clock

Clock types

The provided implementations of Clock are: - RealTimeClock - always returns the real time. - StoppedClock - it always returns times that you have provided in constructor! Useful for tests. - RunningClock - as the previous one it use the time from constructor, but this time is running. - TransactionalClock - wrapper, that allows you to stop the time for some long running operations., (*2)

Adapters

The method Clock::now() returns an instance of \DateTimeImmutable. You can use adapters if you need some others DateTime objects. - MutableDateTimeClock - creates an instance of \DateTime, (*3)

Running Unit Tests

composer install 
php vendor/bin/phpunit

The Versions

06/04 2018

dev-master

9999999-dev

  Sources   Download

beerware

The Requires

  • php ~7.0

 

The Development Requires

by Marcin Czarnecki