Row adding, some webpack tweaks

This commit is contained in:
2018-08-05 23:26:37 +02:00
parent 671fb9b024
commit ace61f2a07
26 changed files with 628 additions and 133 deletions
+8 -3
View File
@@ -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));
}
}