Row adding, some webpack tweaks
This commit is contained in:
@@ -873,7 +873,7 @@ class Utils
|
||||
* @param int|null $timestamp formatted timestamp, or null for current time
|
||||
* @return string result
|
||||
*/
|
||||
public static function fdate($format, $timestamp = null)
|
||||
public static function fdate(string $format, $timestamp = null)
|
||||
{
|
||||
if ($timestamp === null) $timestamp = time();
|
||||
|
||||
@@ -889,7 +889,7 @@ class Utils
|
||||
* @param bool $rough get only approximate time (for estimate)
|
||||
* @return string result
|
||||
*/
|
||||
public static function ftime($secs, $rough = false)
|
||||
public static function ftime(int $secs, $rough = false)
|
||||
{
|
||||
$d = (int) ($secs / 86400);
|
||||
$secs -= $d * 86400;
|
||||
@@ -946,7 +946,7 @@ class Utils
|
||||
* @param $time
|
||||
* @return int seconds
|
||||
*/
|
||||
public static function strToSeconds($time)
|
||||
public static function strToSeconds(string $time)
|
||||
{
|
||||
// seconds pass through
|
||||
if (preg_match('/^\d+$/', trim("$time"))) {
|
||||
@@ -1013,4 +1013,9 @@ class Utils
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
||||
public static function csvToArray(string $data)
|
||||
{
|
||||
return array_map('str_getcsv', explode("\n", $data));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user