More type work

This commit is contained in:
2023-08-02 09:36:44 +00:00
parent 16ad8175d9
commit a60187a3fd
14 changed files with 38 additions and 31 deletions

View File

@ -33,17 +33,17 @@ class Range
// REVIEW: It's probably bad form to have access statics via a derived class, but the syntax looks better :-)
public static function inclusive(int $min, int $max): self
public static function inclusive(int $min, int $max): static
{
return static::create($min, $max);
}
public static function exactly(int $value): self
public static function exactly(int $value): static
{
return static::create($value, $value);
}
public static function atLeast(int $minimumValue): self
public static function atLeast(int $minimumValue): static
{
return static::create($minimumValue, PHP_INT_MAX);
}