mirror of
https://github.com/furyfire/trueskill.git
synced 2025-12-12 10:47:00 +01:00
Fixing codestandards.
This commit is contained in:
@@ -14,21 +14,21 @@ class Guard
|
||||
public static function argumentNotNull(mixed $value, string $parameterName): void
|
||||
{
|
||||
if ($value == null) {
|
||||
throw new Exception($parameterName.' can not be null');
|
||||
throw new Exception($parameterName . ' can not be null');
|
||||
}
|
||||
}
|
||||
|
||||
public static function argumentIsValidIndex(int $index, int $count, string $parameterName): void
|
||||
{
|
||||
if (($index < 0) || ($index >= $count)) {
|
||||
throw new Exception($parameterName.' is an invalid index');
|
||||
throw new Exception($parameterName . ' is an invalid index');
|
||||
}
|
||||
}
|
||||
|
||||
public static function argumentInRangeInclusive(float $value, float $min, float $max, string $parameterName): void
|
||||
{
|
||||
if (($value < $min) || ($value > $max)) {
|
||||
throw new Exception($parameterName.' is not in the valid range ['.$min.', '.$max.']');
|
||||
throw new Exception($parameterName . ' is not in the valid range [' . $min . ', ' . $max . ']');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user