Pint applied for formatting

This commit is contained in:
Alex Wulf
2022-07-05 15:55:47 +02:00
parent bfc558d1f2
commit 7d4547df6a
68 changed files with 670 additions and 402 deletions

View File

@@ -1,4 +1,6 @@
<?php namespace DNW\Skills;
<?php
namespace DNW\Skills;
use Exception;
@@ -12,21 +14,21 @@ class Guard
public static function argumentNotNull($value, $parameterName)
{
if ($value == null) {
throw new Exception($parameterName . " can not be null");
throw new Exception($parameterName.' can not be null');
}
}
public static function argumentIsValidIndex($index, $count, $parameterName)
{
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($value, $min, $max, $parameterName)
{
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.']');
}
}
}
}