Fix various code

This commit is contained in:
James Cole
2023-12-21 06:06:23 +01:00
parent 337d14e71e
commit 8a4985261a
10 changed files with 111 additions and 125 deletions

View File

@@ -34,7 +34,7 @@ class Calculator
{
public const int DEFAULT_INTERVAL = 1;
private static ?\SplObjectStorage $intervalMap = null;
private static array $intervals = [];
private static array $intervals = [];
/**
* @throws IntervalException
@@ -62,6 +62,9 @@ class Calculator
return self::loadIntervalMap()->contains($periodicity);
}
/**
* @SuppressWarnings(PHPMD.MissingImport)
*/
private static function loadIntervalMap(): \SplObjectStorage
{
if (null !== self::$intervalMap) {