Skip to content

Commit b0ddfc1

Browse files
authored
Update Helper.php
1 parent f7a5425 commit b0ddfc1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Helper/Helper.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ class Helper
2424
*/
2525
public static function secondsToDateTime(int $seconds): DateTimeInterface
2626
{
27-
$dateTime = (new Time())->modify('+' . $seconds . ' seconds');
28-
29-
return $dateTime;
27+
return (new Time())->modify('+' . $seconds . ' seconds');
3028
}
3129

3230
/**
@@ -37,22 +35,22 @@ public static function secondsToDateTime(int $seconds): DateTimeInterface
3735
* @return void
3836
* @throws InvalidArgumentException
3937
*/
40-
public static function areKeysLegal(iterable $keys): void
38+
public static function assertLegalKeys(iterable $keys): void
4139
{
4240
foreach($keys as $key){
43-
static::isKeyLegal($key);
41+
static::assertLegalKey($key);
4442
}
4543
}
4644

4745
/**
48-
* Check if key is valid
46+
* Check if the key is valid
4947
*
5048
* @param bool $key key to check
5149
*
5250
* @return void
5351
* @throws InvalidArgumentException
5452
*/
55-
public static function isKeyLegal(string $key): void
53+
public static function assertLegalKey(string $key): void
5654
{
5755
if($key === null || $key === ''){
5856
throw new InvalidArgumentException('Cache key must be a valid string');

0 commit comments

Comments
 (0)