godsdev / rate-limiter-interface
limits number of its calls per time
Installs: 35
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/godsdev/rate-limiter-interface
Requires (Dev)
- phpunit/phpunit: ^4|^5
This package is auto-updated.
Last update: 2025-10-25 01:48:16 UTC
README
Limits the number of requests per time.
- There are two parameters:
periodandrate. - A request is a call of the
inc()method. Aninc()method begins to return false if number of requests perperiodis higher than arate. Unit ofperiodMAY be second or any other time unit.
Test notes
test.sh runs the PHPUnit tests.
test-coverage.sh generates the PHPUnit coverage analysis to the temp folder.
If the php -v command does not show the with Xdebug line, note that for coverage testing you might need to manually edit the php.ini used by your PHP CLI in order to enable the
; XDEBUG Extension