Closed virtualize closed 4 years ago
@virtualize What do you think about alternative approach, of adding new named constructor that would allow custom values, and keeping built-in constructor as is? For example:
public static function custom(int $operations, int $interval)
{
return new static($operations, $interval);
}
$rate = Rate::custom(500, 3*3600)
Like the idea very much and updated the PR. Thanks.
Motive: https://github.com/nikolaposa/rate-limit/issues/19