File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,7 @@ class Helper
24
24
*/
25
25
public static function secondsToDateTime (int $ seconds ): DateTimeInterface
26
26
{
27
- $ dateTime = (new Time ())->modify ('+ ' . $ seconds . ' seconds ' );
28
-
29
- return $ dateTime ;
27
+ return (new Time ())->modify ('+ ' . $ seconds . ' seconds ' );
30
28
}
31
29
32
30
/**
@@ -37,22 +35,22 @@ public static function secondsToDateTime(int $seconds): DateTimeInterface
37
35
* @return void
38
36
* @throws InvalidArgumentException
39
37
*/
40
- public static function areKeysLegal (iterable $ keys ): void
38
+ public static function assertLegalKeys (iterable $ keys ): void
41
39
{
42
40
foreach ($ keys as $ key ){
43
- static ::isKeyLegal ($ key );
41
+ static ::assertLegalKey ($ key );
44
42
}
45
43
}
46
44
47
45
/**
48
- * Check if key is valid
46
+ * Check if the key is valid
49
47
*
50
48
* @param bool $key key to check
51
49
*
52
50
* @return void
53
51
* @throws InvalidArgumentException
54
52
*/
55
- public static function isKeyLegal (string $ key ): void
53
+ public static function assertLegalKey (string $ key ): void
56
54
{
57
55
if ($ key === null || $ key === '' ){
58
56
throw new InvalidArgumentException ('Cache key must be a valid string ' );
You can’t perform that action at this time.
0 commit comments